A CLI application that helps you organize your messy directories by automatically categorizing and moving files based on their extensions.
Dear users and visitors, this project development is COMPLETED and no further development, from the creator's part, is expected in the foreseen future, but feel free to fork the project and build upon it, or improve it in any way. Thanks for your support, keep learning and contributing !
- π Automatically organizes files into appropriate categories
- π¨ Support for common file types (documents, images, videos, audio, etc.)
- βοΈ Customizable file extension mappings
- π Progress tracking with rich console output
- π― Simple and intuitive command-line interface
- Clone the repository:
git clone https://github.com/tahadnan/File-Organizer.git
cd File-Organizer
- Install required dependencies:
pip install -r requiremts.txt
Basic usage to organize a directory:
python main.py /path/to/directory
dirname
: The directory to be organized (required)-c, --custom-mapping
: Path to a JSON file with custom extension mappings-o, --overwrite
: Overwrite default mappings with custom ones completely-v, --verbose
: Display detailed progress instead of a progress bar
- Organize current directory with default settings:
python <script_path> .
- Organize with custom mappings:
python main.py /Downloads -c custom_mappings.json
You can create your own extension mappings using a JSON file. Here's an example structure:
{
"work": [".doc", ".docx", ".pdf"],
"images": [".png", ".jpg", ".gif"],
"custom_category": [".xyz", ".abc"]
}
The organizer comes with the following default categories:
- π Documents (
.pdf
,.doc
,.docx
,.txt
, etc.) - πΌοΈ Images (
.jpg
,.png
,.gif
, etc.) - π₯ Videos (
.mp4
,.avi
,.mkv
, etc.) - π΅ Audio (
.mp3
,.wav
,.flac
, etc.) - π¦ Archives (
.zip
,.rar
,.7z
, etc.) - π» Code (
.py
,.java
,.cpp
, etc.) - βοΈ Executables (
.exe
,.msi
,.app
, etc.) - ποΈ Databases (
.db
,.sqlite
, etc.)
- The program will create directories for each category as needed
- Files with unsupported extensions will be skipped
- Existing files in destination folders won't be overwritten
- Use the
-v
flag to see detailed progress and any potential errors
Contributions are welcome! Feel free to:
- Fork the repository
- Create a new branch (
git checkout -b feature/improvement
) - Make your changes
- Submit a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
Built with Rich for beautiful terminal output