This Python script provides a graphical interface to organize files in your Desktop, Downloads, and any custom folder. It categorizes files by type into separate folders, helping you maintain a clean and organized digital workspace.
- Organize Desktop: Automatically fetches the path of the Desktop and arranges all files into folders based on file types.
- Organize Downloads: Fetches the path of the Downloads folder and organizes files into folders based on file types.
- Custom Folder: Allows users to specify a folder path, and the script organizes files in that folder based on file types.
- Error Handling: Manages errors related to non-existent folders or permission issues.
- File Collision Handling: Prompts the user to overwrite, rename, or skip files with the same name.
- User Confirmation: Asks for user confirmation before organizing files, especially for the Desktop and Downloads folders.
- Logging: Logs all file movements, providing a history of actions performed by the script.
- Python 3.x
- Tkinter (usually comes pre-installed with Python)
- PyInstaller (for creating executable, if needed)
-
Clone the repository:
git clone https://github.com/sanatladkat/File-Organizer.git cd File-Organizer
-
Install dependencies:
pip install -r requirements.txt
-
Run the script:
python file_organizer.py
-
Organize Desktop: Click the "Organize Desktop" button. The program will fetch the Desktop path and organize files into folders based on file types.
-
Organize Downloads: Click the "Organize Downloads" button. The program will fetch the Downloads folder path and organize files into folders based on file types.
-
Custom Folder: Click the "Organize Custom Folder" button. Select a folder through the dialog, and the program will organize files in that folder based on file types.
When a file with the same name already exists in the destination folder, the program will prompt you with three options:
- Yes: Overwrite the existing file.
- No: Rename the file being moved.
- Cancel: Skip moving the file.
The program maintains a log file named file_organizer.log
in the script's directory. This log keeps track of all file movements, helping you see a history of the actions performed by the application.
To create an executable using PyInstaller, follow these steps:
-
Install PyInstaller:
pip install pyinstaller
-
Create the executable:
pyinstaller --onefile file_organizer.py
-
The executable will be created in the
dist
directory.
Download executable : Download File Organizer
Contributions are welcome! If you have ideas for improvements or new features, please open an issue or submit a pull request.
If you have any questions, feel free to contact me via the issues section of this repository.
GitHub Repository: File Organizer