A CLI tool to organize files by their extensions into categorized folders.
- Automatically categorizes files based on their extensions
- Supports multiple file categories (images, documents, videos, etc.)
- Dry-run mode to preview changes before applying them
- Verbose output for detailed logging
- Error handling for permissions and file-in-use scenarios
- Progress display and summary reporting
cargo build --releaseThe binary will be available at target/release/file-organizer
Organize files in the current directory:
file-organizerfile-organizer --source /path/to/directoryfile-organizer --source /path/to/source --output /path/to/outputPreview changes without moving files:
file-organizer --dry-runShow detailed information about the organization process:
file-organizer --verbosefile-organizer --source ~/Downloads --output ~/Organized --dry-run --verbose-s, --source <PATH>- Source directory containing files to organize (default: current directory)-o, --output <PATH>- Output directory for organized files (default: source directory)-d, --dry-run- Preview changes without actually moving files-v, --verbose- Show verbose output-h, --help- Print help information-V, --version- Print version information
cargo testcargo test --test integration_testssrc/main.rs- CLI entry point and argument parsingsrc/categories.rs- File category definitions and mappingsrc/scanner.rs- Directory scanning logicsrc/organizer.rs- File organization and moving logictests/integration_tests.rs- Integration tests
MIT