Automatically sort your messy files into clean, categorized folders — in seconds.
File Organizer is a lightweight Python tool that sorts files into categorized subfolders automatically. Choose between:
- CLI Mode (
file_organizer.py) — Terminal-based interface with simple menu - GUI Mode (
file_organizer_gui.py) — Modern graphical interface with visual controls
| Category | Extensions |
|---|---|
| 🖼️ Images | .jpg .jpeg .png .gif .bmp .tiff .svg .webp |
| 📄 Documents | .pdf .doc .docx .txt .xls .xlsx .ppt .pptx |
| 🎬 Videos | .mp4 .mkv .avi .mov .wmv |
| 🎵 Audio | .mp3 .wav .aac .flac .ogg |
| 🗜️ Archives | .zip .rar .tar .gz .7z |
Custom categories can be added in GUI mode!
- Python 3.6+
- For GUI mode:
python3-tk(usually pre-installed)
git clone https://github.com/yourname/file-organizer.git
cd file-organizerpython file_organizer.pypython file_organizer_gui.py- Dark theme with purple accents
- Responsive layout with proper spacing
- Browse Button — Select any directory
- Current Folder Button — Use the folder where the program is located
- Move — Files moved to exported folder (originals deleted)
- Copy — Files copied to exported folder (originals preserved)
Add your own file type categories:
- Enter Folder Name (e.g.,
projects) - Enter Extensions (e.g.,
.py,.js,.html) - Click Add to create the category
- Files with matching extensions will be sorted into that folder
Preview what files will be sorted without making any changes.
Interactive terminal menu with options:
1— Move files to sorted folders2— Copy files to sorted folders3— Dry run (preview only)4— Exit
Files are organized into:
[selected-folder]/
└── exported/
├── 🖼️ images/
├── 📄 documents/
├── 🎬 videos/
├── 🎵 audio/
├── 🗜️ archives/
└── [your-custom-folders]/
Edit FILE_CATEGORIES in the source code:
FILE_CATEGORIES = {
"images": [".jpg", ".jpeg", ".png", ...],
"code": [".py", ".js", ".ts", ".html"], # Add your own!
...
}- Files with unrecognized extensions are left untouched
- The
exported/directory is created automatically - Running from within
exported/folder is not recommended - GUI requires tkinter (
sudo apt install python3-tkon Ubuntu/Debian)
MIT License — free to use, modify, and share.
Made with ❤️ and Python 🐍