A simple CLI tool for organizing files based on their extensions.
This project is designed as a real-world Rust practice exercise using an incremental development approach — building feature by feature instead of all at once.
structre project can see on this
- Strengthen Rust fundamentals: ownership, borrowing, and error handling.
- Learn filesystem interaction (reading directories, moving files).
- Practice using common Rust crates:
clap,walkdir,serde,indicatif. - Apply a professional development workflow with milestones and versioning.
| Feature | Status |
|---|---|
| Scan folder and list files | resolved |
| Group files by extension | resolved |
CLI arguments (--path, --dry-run) |
resolved |
| Organize (move files) | WIP |
| Progress bar + logging | pending |
.toml config support for custom rules |
pending |
The project will be developed in small iterative releases.
Each milestone corresponds to a version tag.
| Version | Goal | Description |
|---|---|---|
v0.1 |
Directory Scanner | Display all files in a target directory |
v0.2 |
File Grouping | Group scanned files by extension |
v0.3 |
CLI Support | Add CLI arguments (clap) including --path |
v0.4 |
File Moving | Move files based on extension categories |
v0.5 |
UX Improvements | Add progress bar (indicatif) and logging |
v1.0 |
Config Support | Allow custom rules via .toml config |
Tasks are aligned with each milestone.
Check them off as progress is made.
- Initialize project using
cargo new - Implement directory reading (
std::fs,walkdir) - Output list of detected files
- Add basic error handling (missing folder, permissions)
- Add minimal unit tests
- Commit & tag release
v0.1
- Extract file extensions
- Store results in
HashMap<String, Vec<Path>> - Print grouped results
- Add error handling for files without extensions
- Refactor into modular functions
- Commit & tag release
v0.2
- Add
clapdependency - Add CLI options:
--path <directory>--dry-run
- Validate input arguments
- Commit & tag release
v0.3
- Implement
move_to_folder(ext)logic - Auto-create directories if needed
- Add safe-failure mode (skip problematic files)
- Commit & tag release
v0.4
- Add progress bar using
indicatif - Add formatted CLI logs (info/warning/success)
- Commit & tag release
v0.5
- Implement config parsing using
serde+toml - Allow custom extension → folder mapping
- Update documentation
- Commit & tag release
v1.0
| Category | Tool |
|---|---|
| Language | Rust |
| CLI parsing | clap |
| Filesystem traversal | walkdir |
| Config parsing | serde + toml |
| UX enhancement | indicatif |