A simple Python script that helps you automatically organize files in a folder by their types. The script sorts files into categories like Documents, Images, Videos, Audio, Archives, and Code.
This script scans the specified folder, identifies each file type by extension, and moves files into subfolders like Documents, Images, etc.
For example:
report.docx→Documents/photo.jpg→Images/script.py→Code/
Before:
After:
Here are the file types grouped by category:
Click to expand
.pdf, .doc, .docx, .txt, .rtf, .odt, .pages, .xls, .xlsx, .csv, .ppt, .pptx, .odp
.jpg, .jpeg, .png, .gif, .bmp, .tiff, .svg, .webp, .ico, .raw, .heic, .avif
.mp4, .avi, .mov, .wmv, .flv, .webm, .mkv, .m4v, .3gp, .mpg, .mpeg
.mp3, .wav, .flac, .aac, .ogg, .wma, .m4a, .opus, .aiff
.zip, .rar, .7z, .tar, .gz, .bz2, .xz, .tar.gz, .tar.bz2
.py, .js, .html, .css, .java, .cpp, .c, .php, .rb, .go, .rs, .ts, .jsx, .vue
- Python 3.x installed
- Basic terminal/command prompt usage
- Clone or download this repository
- Open a terminal and navigate to the project folder
- Run the script:
python main.py



