A simple Python script to organize files in a directory by categorizing them into folders.
- Automatically sorts files into
Images
,Videos
,Audios
,Documents
,Archives
,Executables
,Codes
, andOther
folders. - Handles duplicate files and prevents overwriting.
- Provides a progress percentage while organizing files.
- Easy-to-use command-line interface.
Download the Python script and run it directly:
- Download
file_organizer.py
from here. - Open the command prompt and navigate to the path that script downloaded.
- Run the script using:
- Follow the on-screen instructions to confirm file organization.
python file_organizer.py
- Images: jpg, jpeg, png, gif, bmp, tiff, webp, svg, ico, heif, heic, raw, jfif
- Videos: mp4, avi, mkv, mov, flv, wmv, webm, mpeg, 3gp, m4v, ts
- Audios: mp3, wav, aac, flac, ogg, m4a, wma, opus, aiff, amr
- Documents: pdf, doc, docx, ppt, pptx, xls, xlsx, txt, rtf, odt, ods, odp, csv, md
- Archives: zip, rar, 7z, tar, gz, bz2, xz, iso
- Executables: exe, msi, bat, sh, apk, dmg
- Codes: html, css, js, json, xml, java, py, c, cpp, cs, php, rb, go, ts, sql
- Other: psd, ai, eps, indd, sketch, and all other extensions
Before running the script:
π Downloads βββ image1.jpg βββ song.mp3 βββ document.pdf βββ video.mp4 βββ archive.zip βββ script.js βββ program.exe
After running the script:
π Downloads βββ π Images β βββ image1.jpg βββ π Audios β βββ song.mp3 βββ π Documents β βββ document.pdf βββ π Videos β βββ video.mp4 βββ π Archives β βββ archive.zip βββ π Code β βββ script.js βββ π Executables β βββ program.exe
This project is open-source. Feel free to modify and distribute it.