Fun File Organizer is a Bash script that organizes files in a specified directory by their file types. It groups files into categorized subfolders based on their extensions, making your file system cleaner and more organized.
- Automatically detects and categorizes files into predefined folders such as Documents, Images, Music, Videos, Archives, and Scripts.
- Creates subfolders dynamically if they don’t already exist.
- Moves uncategorized files into an "Others" folder.
- Easy to use with minimal input from the user.
The script:
- Prompts the user to specify the directory to organize (defaults to the current directory if left blank).
- Scans files and categorizes them based on their extensions.
- Moves files into subfolders named after their categories.
- Documents:
doc
,docx
,pdf
,txt
- Images:
jpg
,png
,gif
,jpeg
,bmp
- Music:
mp3
,wav
,flac
- Videos:
mp4
,mkv
,avi
- Archives:
zip
,rar
,tar.gz
,7z
- Scripts:
sh
,py
,js
- Others: Uncategorized files
- Download the script and save it as
fun_file_organizer.sh
. - Make the script executable:
chmod +x fun_file_organizer.sh
- Run the script:
./fun_file_organizer.sh
- Enter the directory path you want to organize. Press Enter to use the current directory.
- The script will create categorized folders and move files accordingly.
Before running the script:
Documents: file1.doc, file2.pdf
Images: image1.jpg, image2.png
Others: randomfile.xyz
After running the script:
Documents/
- file1.doc
- file2.pdf
Images/
- image1.jpg
- image2.png
Others/
- randomfile.xyz
- Ensure you have the necessary permissions to modify the target directory.
- Be cautious while running the script, as it moves files to subfolders.
This script is open-source and free to use, modify, and distribute.
Enjoy a cleaner, more organized directory structure with Fun File Organizer! 🚀