Skip to content

Organize your files with this tool! It auto-sorts files into categorized folders based on their extensions, offers custom rules, tracks file movements, and even allows undo operations. Perfect for keeping your directories clean and clutter-free.

Notifications You must be signed in to change notification settings

RuhamaGetahun/FILEORGANIZER

Repository files navigation

File Organizer Python Automation Project

What My Project Does

My application is a file organization tool that helps automate the process of sorting files into specific folders based on their extensions. It uses predefined categories for different types of files, such as 3D models, images, videos, documents, and more. The application scans a specified directory, categorizes each file accordingly, and moves them to their designated folders.

Table of Contents

Key Features:

  • Duplicate Detection: Ensures only one copy of each file is kept by calculating MD5 hashes.
  • Custom Rules: Users can customize file categorization rules via a configuration file.
  • Undo Functionality: Allows users to undo file moves.
  • Reset Capability: Supports resetting custom categorization rules to defaults.
  • Error Handling: Features robust error handling with retry logic and logging. This tool improves file organization, prevents clutter, and helps users manage files efficiently.

Challenges and Future Features

Challenges:

  • Accurate file categorization for files with unclear or misaligned extensions.
  • Managing duplicates based on MD5 hashes to avoid false positives.

Future Features:

  • Intelligent categorization using machine learning or file metadata.
  • A user-friendly interface (UI) for better configuration and monitoring.
  • Integration with cloud storage platforms for cross-device file management.
  • Enhanced testing for better application performance.
  • Improved duplicate detection with user review options.

Installation and Run Instructions

Prerequisites

Ensure you have the following installed:

  • Python 3.x (preferably Python 3.7 or later)
  • pip (Python package installer)
  • watchdog library for monitoring file system events.

Installation Step

Clone the Repository:

git clone https://github.com/RuhamaGetahun/FILEORGANIZER.git
cd FILEORGANIZER

Configuration

Custom Rules:

Customize file categorization rules in the custom_rules.json file:

{
  ".txt": "Documents",
  ".jpg": "Images"
}

To reset, delete the custom_rules.json file.

Log File: The script logs all operations in file_movement_log.json for review.

Usage

  1. Run the script using:

python3 file_organizer.py

  1. And then choose from the following options:

File Organizer Script

  1. Organize files (including nested folders)
  2. Undo last moves
  3. Add custom rule
  4. Reset custom rules
  5. Start real-time monitoring

Run tests using pytest

How to run it: pytest test_organize_files.py

Error Handling and Logging

Retry Logic: If an error occurs during the file move process, the script will log the error and attempt to retry the operation (up to 3 times). Error Logs: Logs all errors in file_organization.log.

Troubleshooting

Permission Errors: If the script encounters permission issues, ensure you have read and write permissions for the directories and files you're working with.

Missing Dependencies: If watchdog or other dependencies are missing, ensure that you've installed them, for example, using pip install watchdog.

Thank You! 🙏

Thank you for exploring the File Organizer Python Automation Project! I hope this tool helps you streamline your file management process and makes organizing your digital world a bit easier. If you have any questions, suggestions, or improvements, feel free to open an issue or reach out. I’d love to hear your feedback!

💬 Let’s Connect:

  • Here is my LinkedIn
  • If you’re interested in contributing, check out the "Contributing" section (coming soon!).
  • Join the conversation and share your experiences using the project in your workflow.
  • Follow me on GitHub for updates and future projects!
  • I’m always looking to improve🌱, and your input is what makes this project better. Thanks again for your support! 🚀

About

Organize your files with this tool! It auto-sorts files into categorized folders based on their extensions, offers custom rules, tracks file movements, and even allows undo operations. Perfect for keeping your directories clean and clutter-free.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages