Skip to content

Latest commit

 

History

History
110 lines (72 loc) · 2.04 KB

File metadata and controls

110 lines (72 loc) · 2.04 KB

Rustify

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.


📦 Installation

  1. Clone the repository:

    git clone https://github.com/ixand/rustify.git
    cd rustify
  2. Build the project:

    cargo build --release
  3. Run the binary:

    ./target/release/rustify /path/to/your/folder

🚀 Usage

rustify <DIRECTORY> [OPTIONS]
  • DIRECTORY: The path to the folder you want to organize.

  • OPTIONS:

    • --dry-run: Show what would be moved, without making changes.

Examples

rustify ~/Downloads
rustify ~/Downloads --dry-run

This 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.


🧠 How It Works

Rustify uses predefined file extension mappings to group files into categories:

  • .jpg, .png, .gifImages/
  • .pdf, .docx, .txtDocuments/
  • .mp3, .wavAudio/
  • .mp4, .aviVideo/
  • .zip, .tar.gzArchives/
  • .rs, .py, .jsCode/
  • Unknown types → Other/

🛠 Features

  • 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

🔮 Future Plans

  • Configurable file type mappings (config.toml)
  • Recursive subfolder support (optional)
  • Logging and reporting

📄 License

This project is licensed under the MIT License.


🙌 Contributions

Feel free to open issues or submit pull requests to improve Rustify!