Automatically organizes your messy files into a clean, structured hierarchy based on:
- π Category β Photo, Video, Document, Audio, Other
- π Year β Extracted from file modification date
- ποΈ Month β Organized by month number
π Your Folder
βββ πΈ Photo/
β βββ 2024/
β βββ 01/
β βββ vacation.jpg
βββ π¬ Video/
β βββ 2023/
β βββ 12/
β βββ birthday.mp4
βββ π Document/
βββ 2025/
βββ 02/
βββ invoice.pdf
β¨ Bonus: Works recursively β finds files buried deep in subfolders!
make buildmake run PATH_TO_SORT=/path/to/your/folderExample:
make run PATH_TO_SORT=/media/kanekiezz/photoWant to explore inside the container?
make bashRemove the Docker image when done:
make clean| Feature | Description |
|---|---|
| π Smart Detection | Auto-categorizes files by extension |
| π Date-Based Sorting | Organizes by file modification time |
| π Recursive Scanning | Finds files in all subfolders |
| π‘οΈ Safe Operation | Never overwrites existing files |
| ποΈ Auto-Create Folders | Builds folder structure automatically |
| π³ Dockerized | Run anywhere without dependencies |
| π¨ Multi-Format | Supports 25+ file types |
|
πΈ Photos |
π¬ Videos |
|
π Documents |
π΅ Audio |
π¦ Everything else goes into the Other/ category
graph LR
A[π Input Folder] --> B{Scan Files}
B --> C[Detect Type]
C --> D[Read Date]
D --> E[Create Path]
E --> F[Move File]
F --> G[β
Organized!]
- Scans your folder recursively
- Detects file type by extension
- Reads modification timestamp
- Creates folder structure:
Category/Year/Month/ - Moves file to organized location
- Skips already-organized folders
# Show help
make usage
# Build and run in one command
make build && make run PATH_TO_SORT=/media/kanekiezz/photodocker build -t photo-sorter .
docker run --rm -v /path/to/folder:/data photo-sorter /datapython organize.py /path/to/foldermessy_folder/
βββ IMG_1234.jpg
βββ random_folder/
β βββ old_video.mp4
β βββ nested_folder/
β βββ document.pdf
βββ vacation.mov
messy_folder/
βββ Photo/
β βββ 2024/
β βββ 06/
β βββ IMG_1234.jpg
βββ Video/
β βββ 2024/01/
β β βββ vacation.mov
β βββ 2023/12/
β βββ old_video.mp4
βββ Document/
βββ 2024/05/
βββ document.pdf
Edit the organize.py script to customize:
- π Add more file extensions
- π¨ Change category names
- π Modify folder structure
- π§ Adjust behavior
make build # Build Docker image
make run # Run organizer (requires PATH_TO_SORT)
make bash # Open interactive shell
make clean # Remove Docker image
make usage # Show usage instructionsContributions welcome! Feel free to:
- π Report bugs
- π‘ Suggest features
- π§ Submit pull requests
MIT License β Free to use, modify, and distribute.
- β Run on a copy first to test behavior
- π Already organized? The script skips Photo/Video/Document/Audio/Other folders
- π Large libraries? Docker ensures consistent performance
- π Want logs? Add verbosity to the Python script
Made with β€οΈ for organized people
β Star this repo if it helped you!
