Skip to content

πŸ—‚οΈ A simple and efficient CLI tool that helps organize messy directories by automatically sorting files into categories based on their extensions.

License

Notifications You must be signed in to change notification settings

tahadnan/File-Organizer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ—‚οΈ File Organizer

License: MIT Python 3.6+

A CLI application that helps you organize your messy directories by automatically categorizing and moving files based on their extensions.

Project Status

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 !

✨ Features

  • πŸ“ 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

πŸš€ Installation

  1. Clone the repository:
git clone https://github.com/tahadnan/File-Organizer.git
cd File-Organizer
  1. Install required dependencies:
pip install -r requiremts.txt

πŸ’‘ Usage

Basic usage to organize a directory:

python main.py /path/to/directory

Command Line Arguments

  • 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

Examples

  1. Organize current directory with default settings:
python <script_path> .
  1. Organize with custom mappings:
python main.py /Downloads -c custom_mappings.json

πŸ“ Custom Mappings

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"]
}

πŸ“‚ Default Categories

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.)

⚠️ Important Notes

  • 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

🀝 Contributing

Contributions are welcome! Feel free to:

  1. Fork the repository
  2. Create a new branch (git checkout -b feature/improvement)
  3. Make your changes
  4. Submit a Pull Request

πŸ“œ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments

Built with Rich for beautiful terminal output

About

πŸ—‚οΈ A simple and efficient CLI tool that helps organize messy directories by automatically sorting files into categories based on their extensions.

Resources

License

Stars

Watchers

Forks

Languages