Cleanup Downloads Directory


/ Published in: PHP
Save to your folder(s)

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.


Copy this code and paste it in your HTML
  1. #!/bin/bash
  2.  
  3. cd ~
  4. cd Downloads
  5. i=`date +%Y-%m-%d`
  6. mkdir .$i 2> /dev/null
  7. cp -rf * .$i 2> /dev/null
  8. rm -rf * 2> /dev/null

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

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.