Bash Script to Auto-archive Downloads by Date
Finding the files you are looking for without combing through hundreds of directories is a true time-saver and an easy productivity move.
I try to keep my files and directories in order, named and organized neatly. I don’t have stale files at the base of my home directory. I have separate directories for my projects, my company stuff, and the work I do for my clients.
But my ~/Downloads
directory is always a colossal mess.
Since I cannot find the time to go through it and clean stuff up, I wrote a script that sweeps the problem under the rug.
|
|
This script will take each file in your ~/Downloads
directory and move it to an archive directory named YYYY-MM
where YYYY
and MM
are the year and month of the file’s modified at timestamp (which is usually when the file was downloaded). It will create the archive
directory and subdirectories as needed.
This post is 63rd of my #100DaysToOffload challenge. Want to get involved? Find out more at 100daystooffload.com.
comments powered by Disqus