File Organizer Pro is a robust, multi-threaded desktop application designed to bring order to chaotic directories. Built with Python and customtkinter, it wraps powerful file-management logic in a modern, minimalist dark-mode interface.
Whether you are managing massive datasets, development assets, or just a messy "Downloads" folder, this tool handles heavy lifting asynchronously without freezing the UI, keeping you informed with real-time progress tracking.
- Modern & Sleek UI: Built with
customtkinterfor a premium, native-feeling dark mode aesthetic. - Intelligent Categorization: Comes pre-configured with a granular dictionary for sorting Development files (Python, Web, Configs), ML/Data Models, 3D/Design Assets, MATLAB environments, and general media.
- Safe Preview Mode (Dry Run): Simulate the organization process before committing. The app generates a summary of planned moves, ensuring you never accidentally misplace important files.
- Undo Ledger: Mistakes happen. Every successful batch operation is logged to a local JSON ledger, allowing you to instantly revert the directory to its previous state with a single click.
- Asynchronous Processing: File operations run on a dedicated background thread, keeping the progress bar smooth and the application responsive even when processing thousands of files.
- Custom Rules Engine: Easily add, edit, or remove specific file extensions and route them to custom subfolders using the built-in GUI manager.
The application follows a clean separation of concerns, with a presentation layer (FileOrganizerApp) and a business logic layer (FileOrganizerCore). All file operations are executed on a background thread to keep the UI responsive. The architecture is illustrated below:
flowchart TD
User[User] --> UI[FileOrganizerApp UI]
UI --> |Triggers| Thread[Background Worker Thread]
Thread --> Core[FileOrganizerCore]
Core --> Rules[Rules Engine]
Rules --> |Load/Save| CustomRules[(custom_rules.json)]
Core --> |Read/Write| History[(organize_history.json)]
Core --> FileSystem[File System]
Thread --> |Queue updates| UI
UI --> |Progress & Status| User
UI --> |Preview Modal| User
subgraph UI Thread
UI
end
subgraph Worker Thread
Thread
Core
Rules
FileSystem
end
Key components:
- FileOrganizerApp: Manages the Tkinter UI, event handling, and threading. It enqueues status/progress messages to update the UI thread safely.
- FileOrganizerCore: Contains all the file‑sorting intelligence: rule merging, destination resolution, conflict handling, and folder creation.
- Rules Engine: Combines default rules with optional custom rules (stored in
file_organizer_rules.json). Custom rules take precedence and can override defaults. - History Ledger: Every successful move is logged to
organize_history.json. The undo feature reads this ledger to revert operations. - Asynchronous Processing: File scanning and moves occur in a separate thread; progress is reported via a thread‑safe queue, ensuring the UI never freezes.
- Clone or download the repository.
- Install dependencies:
The only external dependency required is
customtkinter.
pip install customtkinter- Run the application:
python file_organizer.py- Target Directory: Click "Browse" to select the folder you want to organize.
- Configure Rules (Optional): Toggle "Use Custom Rules" to define specific routing for niche file types.
- Preview: Click "Preview (Dry Run)" to see exactly where your files will go without actually moving them.
- Organize: Click "Organize Files" to execute the move.
- Revert: If you change your mind, click the red "Undo Last Action" button at the top right to restore files to their original locations.
The underlying routing logic dynamically reads from the default_rules dictionary. Developers can easily expand file categories (e.g., adding specialized MLOps pipelines, custom game engine assets, or specific cloud config files) simply by updating the dictionary mapping in the __init__ method.
Developed by M. Abdullah Wali