A PyQt-based Python application designed to organize files within a specified directory into categorized folders based on their file types. The tool provides an interactive graphical user interface (GUI) to allow users to easily select directories and monitor file organization progress through a progress bar.
- Automatic File Sorting: Moves files to categorized folders based on extensions (e.g., Documents, Videos, Pictures).
- Configurable Structure: Reads configuration from
config.json
to determine file categories and target directories. - Progress Tracking: Displays a progress bar to visualize the status of file organization.
- Logging: Logs all actions (moved, renamed, or skipped files) to
file_organizer.log
. - Customizable UI: Styled with a modern look and feel.
-
Install the required Python package:
pip install PyQt5
-
Run the Application:
python FileOrganizer.py
- Launch the application.
- Select a directory to organize by clicking on the "Browse" button.
- Click "Start Organizing" to begin sorting the files.
- Monitor the progress on the progress bar.
- Upon completion, a message box will notify you that the task is complete.
The application relies on a config.json
file for customization. If the file does not exist, it is created with default values upon the first run.
{
"base_dir": "~/Downloads",
"file_types": {
"Documents": [".pdf", ".docx", ".txt", ".xlsx", ".pptx", ".doc"],
"Videos": [".mp4", ".mkv", ".mov", ".avi"],
"Pictures": [".jpg", ".jpeg", ".png", ".gif", ".bmp"],
"Music": [".mp3", ".wav", ".flac", ".aac"],
"Archives": [".zip", ".rar", ".7z", ".tar", ".gz"],
"Programs": [".exe", ".msi", ".sh", ".bat"],
"MayaProjects": [".ma", ".mb", ".obj", ".fbx"]
},
"target_dirs": {
"Documents": "~/Documents",
"Videos": "~/Videos",
"Pictures": "~/Pictures",
"Music": "~/Music",
"Archives": "~/Downloads/Archives",
"Programs": "~/Downloads/Programs",
"MayaProjects": "~/Documents/Maya"
}
}
- Modify
config.json
to adjust file type categories and target directories to your needs. - UI Customization: Edit the
setStyleSheet
section in theinit_ui
method of theFileOrganizerApp
class for personalized styling.
All file movements and operations are logged to file_organizer.log
with timestamps and details, making it easy to review what actions were taken.
- Organize your Downloads folder to declutter various files into respective directories.
- Sort project assets like Maya files into dedicated project folders.
- Easily identify unorganized files that do not match any configured file type.
- Add advanced filtering options for selecting specific file types.
- Downloadable executables once i figure out how to do that
This project uses a MIT License. Feel free to read about it on the License page.
Contributions are welcome! Please fork the repository and create a pull request for any new features or improvements.
Happy organizing!