Skip to content

Augani/file-organizer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

74 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

File Organizer

A CLI tool to organize files by their extensions into categorized folders.

Features

  • 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

Installation

Building from source

cargo build --release

The binary will be available at target/release/file-organizer

Usage

Basic usage

Organize files in the current directory:

file-organizer

Specify source directory

file-organizer --source /path/to/directory

Specify output directory

file-organizer --source /path/to/source --output /path/to/output

Dry-run mode

Preview changes without moving files:

file-organizer --dry-run

Verbose mode

Show detailed information about the organization process:

file-organizer --verbose

Combined options

file-organizer --source ~/Downloads --output ~/Organized --dry-run --verbose

Command-line Options

  • -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

Development

Running tests

cargo test

Running integration tests

cargo test --test integration_tests

Project Structure

  • src/main.rs - CLI entry point and argument parsing
  • src/categories.rs - File category definitions and mapping
  • src/scanner.rs - Directory scanning logic
  • src/organizer.rs - File organization and moving logic
  • tests/integration_tests.rs - Integration tests

License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages