Here’s a Python script that will clean and categorize files in your Downloads folder based on their file types. It moves files into categorized subfolders like Images, Documents, Videos, Music, Archives, Executables, and Others.
You can run this script on Windows, macOS, or Linux with Python installed.
How to Use:
-
Save the code to a
.pyfile (e.g.,clean_downloads.py). -
Run it with Python:
python clean_downloads.py. -
It will automatically clean and organize your
Downloadsfolder.
Optional Customization:
-
You can pass a custom path to
clean_downloads("/path/to/your/folder"). -
Add or edit file types in
FILE_CATEGORIESas needed.
Let me know if you want a scheduled task, GUI version, or logging added.
Share this Page your favorite way: Click any app below to share.