A powerful desktop application that organizes files in a directory using a graphical user interface built with Pygame. It automatically categorizes files based on their extensions, helping you maintain a clean and organized file system.
- Features
- Quick Start
- Installation
- Usage
- File Organization Structure
- Categories
- How It Works
- Safety Features
- Customization
- Troubleshooting
- Contributing
- License
- Support
- Version History
- Acknowledgments
- User-Friendly GUI: Simple and intuitive Pygame interface for easy interaction.
- Smart Categorization: Automatically sorts files into predefined categories based on their file extensions.
- Comprehensive File Support: Recognizes a wide range of file extensions (400+).
- Duplicate Handling: Automatically renames duplicate files to prevent overwrites and data loss.
- Visual Feedback: Provides real-time status updates and clear results during the organization process.
- Cross-Platform Compatibility: Works seamlessly on Windows, macOS, and Linux operating systems.
- Install the application following the Installation instructions.
- Run the application using the command:
python main.py. - Click "Select Directory" to choose the directory you want to organize.
- Click "Organize Files" to start the automatic file categorization process.
- Python 3.7 or higher is required. Check your version with
python --version. - pip (Python package installer) should be installed. Most Python installations include pip.
- Clone the repository to your local machine:
bash python main.py 2. The Pygame window will appear, presenting you with three options: - Select Directory: Allows you to choose the directory you wish to organize. - Organize Files: Initiates the file organization process. - Exit: Closes the application.
-
Click the "Select Directory" button and use the file dialog to navigate to and select the target directory.
-
Click the "Organize Files" button to begin the automated file sorting process.
-
The application will display status messages, the number of files moved to each category, and any errors encountered during the process.
After running the organizer, your selected directory will be structured as follows:
- Images: Includes files with extensions like PNG, JPG, GIF, BMP, SVG, PSD, and RAW.
- Videos: Includes video files with extensions such as MP4, AVI, MKV, MOV, WMV, and FLV.
- Audio: Includes audio files with extensions like MP3, WAV, FLAC, AAC, and OGG.
- Documents: Includes documents with extensions like PDF, DOC, DOCX, TXT, Excel, and PPT.
- Archives: Includes archive files with extensions like ZIP, RAR, 7Z, TAR, and ISO.
- Programs: Includes executable files and installers with extensions like EXE, MSI, and APP.
- Code: Includes source code files and configuration files.
- Ebooks: Includes electronic books with extensions like EPUB, MOBI and AZW.
- Data: Includes data files with extensions like JSON, XML, and CSV.
- Fonts: Includes font files with extensions like TTF, OTF, and WOFF.
- 3D_Models: Includes 3D model files with extensions like OBJ, FBX, STL, and BLEND.
- Others: Includes files with unrecognized extensions.
The directory organizer operates through the following steps:
- Directory Scanning: Scans the selected directory to identify all files.
- File Type Identification: Determines the type of each file based on its extension.
- Category Folder Creation: Creates category folders if they do not already exist.
- File Relocation: Moves each file to its corresponding category folder.
- Duplicate Handling: Renames duplicate files by appending a number to the filename to avoid overwriting.
- Unrecognized Files: Places files with unrecognized extensions into the "Others" folder.
- Subdirectory Preservation: Ignores subdirectories, ensuring they remain untouched.
- No Data Loss: Files are moved, not deleted, ensuring no accidental data loss.
- Duplicate Protection: Existing files are never overwritten, preventing any data corruption.
- Directory Preservation: Only files are moved; folders remain untouched, maintaining the directory structure.
- Error Handling: Graceful handling of permission issues and other potential errors.
The file categories can be customized by modifying the FILE_CATEGORIES dictionary in the main script (main.py). You can add or remove extensions as needed to suit your specific requirements.
Example:
python FILE_CATEGORIES = { "Images": [".png", ".jpg", ".jpeg", ".gif", ".bmp", ".svg"], "Documents": [".pdf", ".docx", ".txt", ".csv"], # Add or modify categories as needed }
- Permission Denied Error: If you encounter a "Permission Denied" error, try running the application as an administrator (Windows) or using
sudo(macOS/Linux). - Files Not Being Moved: Ensure the selected directory contains files and not just folders. Also, verify that the file extensions are recognized by the application.
- GUI Window Not Appearing: Make sure that Pygame is installed correctly. Try reinstalling it using
pip install pygame. - Directory Selection Canceled: The file selection dialog might appear behind other windows. Minimize other applications to locate it.
- RAM: 512MB minimum
- Storage: Minimal (a few MB for the application)
- Display: 800x600 resolution minimum
- Operating System: Windows 10+, macOS 10.12+, Ubuntu 18.04+
Contributions are welcome! Feel free to submit issues, fork the repository, and create pull requests for any improvements or bug fixes.
Please follow the contribution guidelines outlined in
CONTRIBUTING.md.
This project is licensed under the MIT License. See the LICENSE file for details.
For any issues or questions, please refer to the documentation or create an issue in the repository.
- v1.0.0 - Initial release with 12 categories and support for 400+ file formats.
- Built with Python and Pygame.
- Uses
tkinterfor native file dialogs. - Inspired by the need for efficient desktop organization.
Note: It is always recommended to back up important files before running any file organization tool. While this application is designed to be safe, maintaining backups is a good practice.