Skip to content

CMON1975/file_organizer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

file_organizer

A CLI tool written in Rust that organizes files into categorized subdirectories by file extension.

Features

  • Organizes files into: Images, Documents, Audio, Video, Code, Archives, Other
  • --dry-run mode to preview changes without moving files
  • --recursive flag to scan subdirectories
  • --verbose flag for detailed output
  • --undo flag to reverse last operation
  • Conflict resolution — duplicate filenames are renamed automatically
  • Colored terminal output

Installation

git clone https://github.com/CMON1975/file_organizer.git
cd file_organizer
cargo build --release

Binary will be at target/release/file_organizer.

Usage

# Organize a directory
file_organizer /path/to/folder

# Preview without moving files
file_organizer /path/to/folder --dry-run

# Verbose output
file_organizer /path/to/folder --verbose

# Recursive scan
file_organizer /path/to/folder --recursive

# Undo last organize operation
file_organizer --undo

The last operation is logged to ~/.local/share/file_organizer/history.log. Only the most recent run can be undone.

Categories

Category Extensions
Images jpg, jpeg, png, gif, bmp, webp, svg
Documents pdf, doc, docx, txt, md, csv, xlsx
Audio mp3, wav, flac, ogg, aac
Video mp4, mov, avi, mkv, webm
Code rs, py, js, ts, html, css, c, cpp, h
Archives zip, tar, gz, rar, 7z
Other anything unrecognized

Configuration

A custom config file can be placed at ~/.config/file_organizer/config.toml to define your own categories and extensions:

[categories]
Images = ["jpg", "jpeg", "png"]
Documents = ["pdf", "txt", "md"]
Ebooks = ["epub", "mobi", "azw3"]

Or specify a config file directly:

file_organizer /path/to/folder --config /path/to/config.toml

If no config is found, built-in defaults are used.

License

MIT

About

A CLI tool written in Rust that organizes files into categorized subdirectories by extension, with TOML config support, undo functionality, and dry-run mode.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages