A simple Rust CLI tool that organizes files by their extensions into categorized subdirectories.
- Organizes files into categories: images, documents, videos, audio, archives, executables, code, and others
- Creates subdirectories automatically if they don't exist
- Provides real-time feedback on file operations
- Handles errors gracefully (missing files, permission issues, etc.)
- Skips directories and files without extensions
Make sure you have Rust installed, then build the project:
cargo build --releasecargo run -- /path/to/folder/to/organizeOr if you've built the release binary:
./target/release/cli_organizer /path/to/folder/to/organize- images: jpg, jpeg, png, gif, bmp, svg, webp
- documents: pdf, doc, docx, txt, rtf, odt
- videos: mp4, avi, mkv, mov, wmv, flv, webm
- audio: mp3, wav, flac, aac, ogg, wma
- archives: zip, rar, 7z, tar, gz, bz2
- executables: exe, msi, deb, rpm, dmg, pkg
- code: html, css, js, ts, py, rs, java, cpp, c
- others: all other file types
$ cargo run -- ./downloads
Organizing files in: ./downloads
Created directory: ./downloads/images
Created directory: ./downloads/documents
Moved: ./downloads/photo.jpg -> ./downloads/images/photo.jpg
Moved: ./downloads/report.pdf -> ./downloads/documents/report.pdf
Moved: ./downloads/song.mp3 -> ./downloads/audio/song.mp3
Organization complete!
Files moved: 3
Files skipped: 0
Successfully organized files!