PyOrganize is a simple Python script that automatically organizes files in a specified directory into subfolders based on their file types. Keep your directories clean and structured with minimal effort!
PyOrganize scans a given directory and organizes files into categorized subfolders based on their extensions:
| Category | Example Extensions |
|---|---|
| Images | .jpg, .png, .gif, .svg |
| Documents | .pdf, .docx, .txt, .csv |
| Audio | .mp3, .wav, .flac |
| Video | .mp4, .mkv, .mov |
| Archives | .zip, .tar, .gz, .rar |
| Scripts | .py, .sh, .js, .php |
| Code | .html, .css, .json, .yaml |
| Other | Any file type not categorized |
Run the script to organize your folder:
python3 main.py ~/DocumentsThis command will:
- Scan the
~/Documentsfolder. - Create subfolders like
Images/,Documents/,Audio/, etc. - Move each file to its corresponding category folder.
Output Example:
📂 Organizing folder: /home/user/Documents
➜ report.pdf → Documents/
➜ holiday.png → Images/
➜ notes.txt → Documents/
✅ Done organizing!
- Python 3.6+
- No external libraries required — PyOrganize works out of the box!
- Supports absolute, relative, or home (~) paths.
- Compatible with Linux, macOS, and Windows.
- Optionally, make the script executable for convenience:
chmod +x main.py ./main.py ~/Downloads
- Clone or download the script.
- Place
main.pyin your desired directory. - Run the script with a target folder:
python3 main.py /path/to/your/folder ``
git clone https://github.com/ramackersjp/PyOrganize.git
cd ~/PyOrganize
chmod +x main.py
yay -S pyorganize
Usage on arch command: pyorganize ~/Pictures
pip install pyorganize==1.0.0
Usage on pip command: pyorganize ~/Pictures
Keep your files tidy with PyOrganize 🎉