Organize any folder
in seconds.
FO is a tiny command-line tool that sorts a messy folder into clean subfolders by type, date, size or your own rules — with a dry-run preview and one-key undo.
curl -fsSL https://raw.githubusercontent.com/aliakpoyraz/file-organizer/main/install.sh | bashTry it right here
Hit Organize — then change your mind and Undo.
Rules for every kind of mess
By extension
.jpg, .pdf, .mp4 … each type flows into its own folder.
By date
Group by created or modified time into a 2026/07 tree.
By size
Small, medium and large buckets — split the heavy files out.
Custom rules
Match filenames with regex or glob patterns for anything else.
Dry-run preview
See exactly what will move before a single file is touched.
One-key undo
Changed your mind? Restore everything and delete empty folders.
Watch mode
Keep a folder tidy automatically as new files land in it.
Safe atomic moves
Copy → verify → delete. An interrupted run never loses a file.
Reporting
A clean summary of what moved, by rule, after every run.
Just type fo
An interactive menu opens — arrow keys, Enter, done. No flags to memorize. Power users still get the full CLI underneath.
______ ____ | ____| / __ \ | |__ | | | | fo.aliakpoyraz.com | __| | | | | Sort your files, undo anytime. | | | |__| | |_| \____/
Configurable to the bone
Drop a YAML file and describe exactly where each kind of file should go. Placeholders like {year} build folder trees for you.
rules:
- name: images
extensions: [jpg, png, gif, heic]
destination: "{source}/Images/{year}/{month}"
- name: documents
extensions: [pdf, docx, txt]
destination: "{source}/Documents"
- name: large-archives
extensions: [zip, tar, gz]
min_size: 100MB
destination: "{source}/Archives/large"Get FO
Fastest way — one line, no Python needed:
curl -fsSL https://raw.githubusercontent.com/aliakpoyraz/file-organizer/main/install.sh | bashchmod +x fo-macos-arm64 && mv fo-macos-arm64 /usr/local/bin/foOne self-contained binary. No Python, no dependencies.