Show HN: Groupr – Rust CLI that sorts files into subfolders by extension

Contribute to TimFinnigan/groupr development by creating an account on GitHub.
4 points by timfinnigan 191 days ago github.com 0 comments
Summary not yet generated for this article.

Original Text

Wrote this to clean up my Downloads folder. It moves top-level files into subfolders named after their extension. photo.PNG goes into png/, files with no extension go into no_extension/. --dry-run if you want to see what it would do first.

A few details: it doesn't recurse into existing subfolders, extensions are lowercased so you don't get png/ and PNG/ coexisting, and it handles name collisions by appending _1, _2, etc. rather than overwriting.

~150 lines of Rust, no dependencies outside of tempfile in dev.

cargo install --git https://github.com/timfinnigan/groupr groupr ~/Downloads --dry-run

Comments (0 of ) ⌛

Loading more comments... ⌛
Scroll down to load more comments
No comments available.
Type to search HN and engineering blog articles
Press Escape to close  |  ↑↓ to navigate  |  Enter to open