This Python script helps you to automatically organize files in your Downloads folder into designated subfolders based on their file types. It's a simple and efficient way to keep your Downloads folder uncluttered.
- Automatic Sorting: Sorts files into folders like Images, PDFs, Documents, Music, Videos, etc.
- Customizable: Easily add more file types and corresponding folders.
- Simple to Use: Just run the script and your Downloads folder will be organized.
- Python 3.x
No additional installation required, as the script uses standard Python libraries.
- Clone or download this repository to your local machine.
- Open the script
organize_downloads.py
. - Modify the
download_folder_path
in the script to the path of your Downloads folder.download_folder_path = '/Users/yourusername/Downloads'
- (Optional) Modify the
file_type_to_folder
dictionary in the script to customize the file types and their corresponding target folders. - Run the script:
python organize_downloads.py
The script includes a default set of file type mappings to folders. You can modify or extend this mapping in the script. Here's the default mapping:
- Images:
.jpg
,.jpeg
,.png
,.gif
- PDFs:
.pdf
- Documents:
.docx
- Spreadsheets:
.xlsx
- PowerPoint Presentations:
.ppt
,.pptx
- Text Files:
.txt
- Music:
.mp3
- Videos:
.mp4
- Archives:
.zip
,.rar
Contributions to enhance this script are welcome. Feel free to fork this repository and submit pull requests.
This project is open source and available under the MIT License.
Please ensure to backup your Downloads folder before running this script to avoid any unintended data loss.
Feel free to customize this README to better suit your project's needs or to add any additional information you deem necessary.