A small Python CLI tool that organizes files by extension into category folders.
Use it to clean up a messy folder, especially downloads, by moving images, documents, archives, installers, code, audio, and video files into the right subfolders.
--apply to actually perform the file movesname (1).ext, name (2).ext, etc.desktop.ini and thumbs.db--min-age-days| Platform | Support | Notes |
|---|---|---|
| Windows 10/11 | Supported | Best tested platform for this project |
| macOS | Supported | Works with Python 3.10+ |
| Linux | Supported | Works with Python 3.10+ |
sorter.py - main CLI script and package entry pointREADME.md - project instructionspyproject.toml - package metadata for PyPILICENSE - MIT license textpip install downsorter
This is the safest way to run the tool first.
downsorter --folder "C:\Users\YourName\Downloads"(or put path inside "" of whatever folder you want to sort)
downsorter --folder "C:\Users\YourName\Downloads"(or put path inside "" of whatever folder you want to sort) --apply
downsorter --folder "C:\Users\YourName\Downloads" --min-age-days 7 --apply
--folder: Folder to organize. Defaults to the current user’s Downloads folder.--apply: Actually move files. Without this flag, the script only previews the planned moves.--min-age-days: Only move files that have not been modified for at least this many days.The project currently sorts files into:
Images (.jpg, .jpeg, .png, .webp, .bmp)PDFs (.pdf)Documents (.doc, .docx, .txt, .md, .rtf)Spreadsheets (.xls, .xlsx, .csv, .tsv)PPTs (.ppt, .pptx)Archives (.rar, .zip, .7z, .tar, .gz)Installers (.exe, .msi)Code (.py, .js, .html, .css, .json, .xml, .cpp, .java)Audio (.mp3, .wav, .flac, .aac, .ogg)Videos (.mp4, .gif, .mov, .mkv, .avi, .webm)Other for everything elseRun this to preview then apply:
downsorter --folder "C:\Users\YourName\Downloads"
downsorter --folder "C:\Users\YourName\Downloads" --apply
This project is licensed under the MIT License.