This Python script organizes files in a specified directory by deleting duplicate files and categorizing them into subdirectories based on file extensions. It provides options for the user to input the directory path and monitors the directory for new files, ensuring proper organization.
-
Delete Duplicate Files: The script identifies and deletes duplicate files in the specified directory.
-
Categorize Files: Files are categorized into subdirectories based on their file extensions. Categories include Images, PDFs, Datasets, and Videos.
-
Monitor Directory: The script continuously monitors the specified directory for new files and organizes them accordingly.
-
Run the script by executing the Python file.
python file_organizer.py
-
Enter the path to the directory you want to organize when prompted.
-
The script will delete duplicate files, categorize existing files, and continuously monitor the directory for new files.
-
Delete Duplicate Files: The script checks for duplicate files and deletes them.
-
Categorize Files: Files are categorized into subdirectories based on predefined categories.
-
Monitor Directory: The script continually monitors the specified directory for new files.
- Directory Path: Enter the path to the directory you want to organize.
- Python 3.x
- External libraries:
os
,re
,time
-
Ensure the specified directory exists and is not empty before running the script.
-
The script creates subdirectories for each file category if they do not already exist.
-
The script is designed to run continuously and classify new files in real-time.
This project is licensed under the MIT License.