-
Notifications
You must be signed in to change notification settings - Fork 0
How Sortify Works
A_Reza edited this page Nov 18, 2025
·
1 revision
When you run Sortify, it scans the specified directory and moves files into sub-folders based on their extension.
Below is the default configuration for file sorting.
| Category | Folder Name | Extensions |
|---|---|---|
| Images | /Images |
.jpg, .jpeg, .png, .gif, .bmp, .svg, .tiff, .webp
|
| Videos | /Videos |
.mp4, .mkv, .mov, .avi, .flv, .wmv
|
| Documents | /Documents |
.pdf, .doc, .docx, .txt, .ppt, .pptx, .xls, .xlsx, .csv
|
| Music | /Music |
.mp3, .wav, .aac, .flac
|
| Archives | /Archives |
.zip, .rar, .7z, .tar, .gz
|
| Programs | /Programs |
.exe, .msi, .dmg, .apk, .deb, .rpm, .appimage
|
| Code | /Code |
.py, .js, .html, .css, .java, .cpp, .php, .c, .ts, .go, .rs
|
Any file not matching these extensions is placed in an "Others" folder.
Sortify includes a Collision Prevention system.
Scenario:
You have document.pdf in your source folder, but the Documents folder already contains a file named document.pdf.
Result:
Sortify will NOT overwrite the existing file. Instead, it will rename the new file to document_1.pdf (or document_2.pdf etc.) and then move it safely.
To protect your system and the script itself, Sortify ignores:
-
main.py(The script itself) -
.DS_Store(macOS system files) - Folders (It only moves files, it does not move folders inside folders).