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.
-
Build the Jar file:
./gradlew shadowJar
If successful, find the output in
app/build/libs. -
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
~/binis on the PATH.
You can also move it to the/bininstead of the user'sbinCreate 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
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
organizeBy default, it will scan the current folder you are in.