This script organizes files in a specified directory into subfolders based on file types. It categorizes files into predefined folders, such as Images, Documents, Videos, etc., making your directory neat and easy to navigate.
To run the script, use the following command in your terminal:
python clean_folder.py --path=/your/directory/path
python clean_folder.py --path=/mnt/e/Downloads/
- Scans the directory: The script scans the specified directory for files.
- Categorizes files: It checks the file extensions and matches them to predefined categories.
- Creates folders: Creates the necessary folders if they don't already exist.
- Moves files: Moves the files into their respective folders based on their extensions.