Rustify is a fast and simple command-line tool that sorts and organizes files in a given directory
based on file extensions and predefined categories (e.g., images, documents, audio, video, etc).
Built with Rust, using clap, walkdir, and std::fs.
-
Clone the repository:
git clone https://github.com/ixand/rustify.git cd rustify -
Build the project:
cargo build --release
-
Run the binary:
./target/release/rustify /path/to/your/folder
rustify <DIRECTORY> [OPTIONS]-
DIRECTORY: The path to the folder you want to organize. -
OPTIONS:--dry-run: Show what would be moved, without making changes.
rustify ~/Downloads
rustify ~/Downloads --dry-runThis will scan your Downloads folder and move files into subfolders like:
Downloads/
├── Images/
├── Documents/
├── Audio/
├── Video/
├── Archives/
├── Code/
├── Other/
Each category is based on file extensions.
Rustify uses predefined file extension mappings to group files into categories:
.jpg,.png,.gif→Images/.pdf,.docx,.txt→Documents/.mp3,.wav→Audio/.mp4,.avi→Video/.zip,.tar.gz→Archives/.rs,.py,.js→Code/- Unknown types →
Other/
- Cross-platform (Linux, Windows)
- Fast and lightweight
- Safe: creates folders and moves files without deleting anything
- Supports dry-run mode (
--dry-run): preview what will be moved without making any changes - Open source
- Configurable file type mappings (
config.toml) - Recursive subfolder support (optional)
- Logging and reporting
This project is licensed under the MIT License.
Feel free to open issues or submit pull requests to improve Rustify!