Created
December 28, 2023 07:21
-
-
Save jericjan/9d2a4ace3e825b47a812380f8b9e2464 to your computer and use it in GitHub Desktop.
Automatically move .osz files to osu! Songs folder (Any file to any path)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pathlib import Path | |
import time | |
songs_folder = Path("C:/Users/USER/AppData/Local/osu!/Songs") | |
downloads_folder = Path("C:/Users/USER/Downloads/") | |
while True: | |
file_count = 0 | |
for file in downloads_folder.glob("*.osz"): | |
file.rename(songs_folder / file.name) | |
print(f'Moved "{file.name}"') | |
file_count += 1 | |
if file_count == 0: | |
print("No files moved") | |
time.sleep(5) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment