Return to Snippet

Revision: 63577
at May 18, 2013 07:56 by brownrl


Initial Code
#!/bin/bash

cd ~
cd Downloads
i=`date +%Y-%m-%d`
mkdir .$i 2> /dev/null
cp -rf * .$i 2> /dev/null
rm -rf * 2> /dev/null

Initial URL
http://www.itsgotto.be/cv.php

Initial Description
This is a simple script to go into your downloads directory ( mac ). Move everything to a .YYYY-MM-DD folder. Thus you Downloads directory gets cleaned up and anything that was there has been placed into a hidden folder for finding later.

My Downloads folder is just always full of things but I don't want to blast it empty. Re-getting a file from some website is sometimes hard to remember. So I move everything to a backup and start again.

Initial Title
Cleanup Downloads Directory

Initial Tags
Bash, script

Initial Language
PHP