Skip to content

Automatically sorts files in your Downloads folder into categorized subfolders based on file type using a shell script and incron.

Notifications You must be signed in to change notification settings

nubEA/File-Sorter-Script

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

6 Commits
ย 
ย 
ย 
ย 

Repository files navigation

Auto Download Sorter ๐Ÿ—‚๏ธ

This tool automatically organizes your Downloads folder by moving newly downloaded files into categorized subfolders based on their file type (Images, Videos, Documents, etc.). It uses a Bash script and incron to watch for new files and trigger sorting in real-time.


๐Ÿ“ Features

  • Automatically sorts files into:
    • Images (.png, .jpg, .jpeg, etc.)
    • Videos (.mp4, .mkv, etc.)
    • Audios (.mp3, .wav, etc.)
    • Documents (.pdf, .txt, .docx, etc.)
    • Archives (.zip, .rar, .gz, etc.)
    • Presentations (.pptx)
    • Others (anything else)
  • Triggered instantly on new file creation or move
  • Works in the background using incron

โš™๏ธ Setup Instructions

1. Clone the Repository

git clone https://github.com/yourusername/auto-download-sorter.git
cd auto-download-sorter

2. Install incron

sudo dnf install incron
sudo systemctl enable --now incrond

3. Make the Script Executable

chmod +x sort_download.sh

4. Add the Script to Your incrontab

incrontab -e

Add this line (replace /absolute/path/to/ if needed):

/home/YOUR_USERNAME/Downloads IN_CLOSE_WRITE /absolute/path/to/sort_download.sh %w%f

About

Automatically sorts files in your Downloads folder into categorized subfolders based on file type using a shell script and incron.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages