A script to organize files on your Linux system, providing efficiency and simplicity for those who want to increase organization.
The script moves files with the following formats: txt, xlsx, docx, pptx.
# Default script configuration
bash organizer.sh # Using flags to specify input and output directories
bash organizer.sh -d /home/user/ -o /home/user/Documents-
Automatic file organization
-
Uses
mkdirto create folders -
Uses
mvto move files into the correct folders -
Help page (
-hflag) -
Easy to maintain
Usage Format: bash $0 [options]
Default Input: /home/user/*/
Default Output: /home/user/Documents/
Options:
-h, --help Show help
-d, --directory Directory (input)
-o, --output Directory (Output)
--version Show Version
-hShow help.-dThe directory containing the files you want to move.-oOutput directory (your files will be moved here)--versionShow the current version
- Clone the repository:
git clone https://github.com/d4vidlinux/file_organizer.git
cd file_organizer- Give execute permission:
chmod +x organizer.sh- Execute
./organizer.shThis is a prototype created for learning bash.
It is designed to be easy to maintain and understand.
Don't use "/" in the -o flag, only in the -d flag.