Automated Downloads Organizer
This script helps organize files in the Downloads
folder by moving them to specific folders based on their file extensions. It also includes an additional feature to move screenshots from the desktop to a separate folder.
- Python 3.x installed on your system
-
Open a text editor and create a new file.
-
Copy and paste the provided code into the file.
-
Save the file with the extension of a
.py
extension, for example,downloads_organizer.py
. -
Open a terminal or command prompt and navigate to the directory where the script file is saved.
-
Run the script by executing the following command:
python downloads_organizer.py
-
The script will start monitoring the
Downloads
folder and automatically move files to their respective folders based on their extensions. -
Screenshots saved on the desktop will also be moved to a separate
Screenshots
folder. -
The script will run continuously until you manually stop it by pressing
Ctrl + C
.
The script comes with pre-defined destination folders for various file extensions. You can modify these folders according to your preferences by editing the file_extensions
dictionary in the script.
file_extensions = {
".jpg": images_folder,
".jpeg": images_folder,
".gif": images_folder,
".png": images_folder,
".mp4": videos_folder,
".mov": videos_folder,
".avi": videos_folder,
".mp3": audios_folder,
".wav": audios_folder,
".aac": audios_folder,
".zip": os.path.join(downloads_folder, "Project"),
".sql": os.path.join(downloads_folder, "Database"),
".pdf": pdf_folder,
".dmg": software_folder
}
You can add, remove, or modify file extensions and their corresponding destination folders to suit your needs.
Make sure to keep the script running in the background to continuously organize your files. You can add the script to your system's startup programs to automate the process.
Please note that this script is provided as a starting point and may require customization based on your specific requirements and folder structure.
Disclaimer: Use this script at your own risk. Make sure to backup important files before running the script, as it involves moving files on your system. The script is provided as-is without any warranty.