Automatically organize your ~/Downloads
folder by file type (images, videos, documents, etc.) and keep it clean in real-time. This script moves files into subfolders based on their MIME type, shows progress, and optionally monitors the folder for new files.
- 📂 Automatically categorizes and moves files based on type
- 🎯 Detects MIME type using
python-magic
(accurate over just file extensions) - 🔄 Real-time monitoring with
watchdog
- 📦 Progress bar during large file transfers
- 📜 Organizes existing files on startup
Files are automatically moved into the following folders inside ~/Downloads
:
Category | Folder Name | Emoji |
---|---|---|
Images | Images | 🖼️ |
Videos | Videos | 🎞️ |
Audio | Audio | 🎵 |
Documents | Documents | 📄📊 |
Archives | Archives | 🗜️ |
Others | Others | 📦 |
pip install python-magic watchdog
On macOS, you may need libmagic
:
brew install libmagic
python main.py
It will:
- Organize existing files.
- Ask to start real-time monitoring (press
y
to enable).
- Edit
EXTENSION_TO_FOLDER
dictionary in the script to add or modify MIME-based rules.
Created by [Your Name]
Pull requests welcome!
Special thanks to:
python
file-management
automation
downloads
organizer
watchdog
file-sorter
real-time
python-magic