pyorganize is a Python library and CLI tool to automatically organize files in your directories by type. It helps keep your folders clean by sorting files into categories like Images, Documents, Videos, Music, Archives, and more.
- Organize files in any folder by type
- Supports Images, Documents, Videos, Music, Archives, and more
- Easy-to-use CLI and Python API
- Customizable rules and presets
- Extensible for your own file types
pip install pyorganizefrom pyorganize import organize
organize("/path/to/your/folder")pyorganize <folder_path>
# Example:
pyorganize ~/DownloadsFiles are moved into subfolders based on their extension:
- Images:
.jpg,.jpeg,.png,.gif - Documents:
.pdf,.docx,.txt,.xlsx - Videos:
.mp4,.mkv,.avi - Music:
.mp3,.wav - Archives:
.zip,.rar - Others: Everything else
You can customize these rules in the code or extend them for your needs.
from pyorganize import organize
organize("Downloads")You can add your own file type rules by editing pyorganize/core/file_types.py or by contributing new rules in pyorganize/rules/.
We welcome contributions! See docs/contributing.md for guidelines.
MIT License