A simple and efficient bash script to automatically organize your downloaded files by type.
- Automatic organization: Sorts your files by extension into dedicated folders
- Full logging: Records all operations with timestamps
- Multi-format support: Images, videos, audio, documents, archives, and installers
- Error handling: Checks if the Downloads folder exists
- "Others" folder: Unrecognized files are automatically sorted
The script organizes your files into the following folders:
| File Type | Supported Extensions | Destination Folder |
|---|---|---|
| Images | jpg, jpeg, png, gif, webp, avif, svg | Pictures/ |
| Videos | mp4, mkv, avi, mov | Videos/ |
| Audio | mp3, wav, flac, m4a, opus | Audio/ |
| Documents | pdf, doc, docx, xls, xlsx, ppt, pptx, txt | Docs/ |
| Archives | zip, tar, gz, rar, 7z | Archives/ |
| Installers | exe, appimage, deb, rpm | Installers/ |
| Others | All other formats | Other/ |
- Linux system with bash
- Existing
~/Downloadsfolder
-
Clone the repository
git clone https://github.com/Amedon-Roland/organize_dowload_folder.git cd organize_dowload_folder -
Make the script executable
chmod +x script.sh
-
Run the script
./script.sh
To run the script automatically, add it to your crontab:
# Run every hour
0 * * * * /path/to/script.sh
# Run every day at 11:00 PM
0 23 * * * /path/to/script.shThe script generates a detailed log file in ~/organiser_telechargements.log containing:
- Timestamp of each execution
- List of all moved files
- Destination of each file
- Any error messages
Example log:
==== 2025-05-29 14:30:15 ====
Moved: document.pdf → Docs/
Moved: photo.jpg → Pictures/
Moved: video.mp4 → Videos/
Organization complete.
- ✅ Linux - Current version
- ⏳ Windows - In development
🚧 Coming soon: A PowerShell version for Windows will be available soon!
Contributions are welcome! Feel free to:
- Report bugs
- Suggest new features
- Improve documentation
- Add new file types
This project is licensed under the MIT License. See the LICENSE file for details.
If you encounter issues or have questions:
- Open an issue on GitHub
- Check the logs in
~/logs/download_files_organizer.log - Make sure the
~/Downloadsfolder exists
Made with ❤️ by RolandTech
⭐ If this project helps you, please consider giving it a star on GitHub!