Skip to content

Instantly share code, notes, and snippets.

@jericjan
Created December 28, 2023 07:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jericjan/9d2a4ace3e825b47a812380f8b9e2464 to your computer and use it in GitHub Desktop.
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)
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