Skip to content

jksalcedo/file-organizer-cli

Repository files navigation

File Organizer CLI

A basic file organizer that organizes your files into their respective folders.

Example: If you are inside the Downloads folder, then all the recognized files will be moved. All .png or .jpg files will be moved to Downloads/Images folder.

Installation

  1. Build the Jar file:

    ./gradlew shadowJar

    If successful, find the output in app/build/libs.

  2. Install on the system Move

    mkdir -p ~/bin
    mv app/build/libs/app-all.jar ~/bin/organizer.jar 

    Rename it to whatever you want. It doesn't matter. Make sure ~/bin is on the PATH.
    You can also move it to the /bin instead of the user's bin

    Create a wrapper script

    # Create the file
    touch ~/bin/organize
    
    # Edit it using your desired editor
    nano ~/bin/organize

    Paste this

    #!/bin/bash
    java -jar ~/bin/organizer.jar "$@"

    Make it executable

    chmod +x ~/bin/organize

Running

Navigate to the folder you want to organize then run:

# Dry run - will only list the actions to be done
organize --dry-run

# Actual action
organize

By default, it will scan the current folder you are in.

About

Organize your files easily in a CLI

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages