A fast, zero-dependency Rust CLI that organizes loose files in a folder by moving them into subfolders named after their file extension.
Downloads/
photo.PNG → Downloads/png/photo.png
resume.PDF → Downloads/pdf/resume.pdf
notes.txt → Downloads/txt/notes.txt
archive.tar.gz → Downloads/gz/archive.tar.gz
README → Downloads/no_extension/README
Prerequisites: Rust 1.56+
git clone https://github.com/timfinnigan/groupr.git
cd groupr
cargo install --path .The binary is installed as groupr.
groupr <directory> [--dry-run]
| Argument | Description |
|---|---|
<directory> |
Path to the folder to organize |
--dry-run |
Preview what would be moved without touching any files |
# Organize your Downloads folder
groupr ~/Downloads
# Preview first
groupr ~/Downloads --dry-run
# Organize the current directory
groupr ./Users/tim/Downloads/photo.PNG -> /Users/tim/Downloads/png/photo.PNG
/Users/tim/Downloads/resume.pdf -> /Users/tim/Downloads/pdf/resume.pdf
/Users/tim/Downloads/notes.txt -> /Users/tim/Downloads/txt/notes.txt
Done: 3 file(s) moved.
- Only top-level files are moved — existing subfolders and their contents are never touched.
- Extensions are lowercased —
Photo.PNGgoes intopng/, notPNG/. - Files without an extension go into a
no_extension/folder. - Collision avoidance — if
png/photo.pngalready exists at the destination, the incoming file is saved aspng/photo_1.png,png/photo_2.png, etc. - Destination folders are created automatically if they don't already exist.
cargo build # debug build
cargo build --release # optimized build → target/release/groupr
cargo test # run unit testsMIT