luke0x / drefile

An automatic, chronological file organizer

drefile / README
100644 32 lines (30 sloc) 1.171 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
drefile: an automatic, chronological file organizer
---------------------------------------------------
Every few minutes drefile copies all files on your Desktop to a folder
such as ~/Documents/2009-06-June/26-Friday, prepending a timestamp
(like 20090626.1310) to the filename.
 
Use
---
1. Put files on your Desktop, and in a few minutes they will be 'drefiled'
2. Use the 'Today' alias on your Desktop to go to today's folder
3. Type 'dday' to go to today's directory
4. Type 'dmonth' to go to this month's directory
5. Type 'drefile file' to manually timestamp + move a file
 
Install
-------
1. `sudo port install osxutils` # requires mkalias
2. `sudo gem install open4`
3. copy the 3 files in /bin to ~/.bin (or whatever, in the path)
4. `chmod +x` the 3 files
5. `crontab -e` one of these (as your user):
  # run every 5 minutes on the 5
  0,5,10,15,20,25,30,35,40,45,50,55 * * * * /HOME_DIRECTORY/.bin/drefile >> /HOME_DIRECTORY/.bin/drefile_cron.log
  # run once/day at 5am
  * 5 * * * /HOME_DIRECTORY/.bin/drefile >> /HOME_DIRECTORY/.bin/drefile_cron.log
6. add to ~/.profile:
  dday(){
    eval $(~/.bin/dday.rb)
  }
  dmonth(){
    eval $(~/.bin/dmonth.rb)
  }