A Python script that organizes files in a directory based on their file extensions into categorized folders.
This script categorizes files based on their file extensions and moves them into specific directories. This helps in organizing a messy directory by grouping files of similar types into separate folders.
- Automatic Organization: Scan the current directory and organize files into respective folders.
- Extensible: Easily extendable to support more file formats and directories.
- Simple: Lightweight and straightforward script to organize files efficiently.
Here's a breakdown of directories and file formats supported:
- AI: .safetensors
- HTML: .html5, .html, .htm, .xhtml
- IMAGES: .jpeg, .jpg, .tiff, .gif, .bmp, .png, .bpg, .svg, .heif, .psd, .jfif
- VIDEOS: .avi, .flv, .wmv, .mov, .mp4, .webm, .vob, .mng, .qt, .mpg, .mpeg, .3gp
- Clone the repository or download the script.
- Navigate to the directory containing the script.
- Run the script using the command:
organize_downloads.py
The script utilizes Python's os
and pathlib
libraries to scan the current directory. It matches files based on their file extensions to predefined directories. Once matched, the script moves the file into the respective directory.
Contributions are welcome! Feel free to open issues or submit pull requests to enhance the functionality or add new features.
This project is licensed under the MIT License. See the LICENSE file for details.