Is it possible to set up a script that executes every day and deletes all the files in a directory older than 1 day?
Page 1 of 1
Automatically Delete Old Files in Directory
#3
Posted 23 October 2007 - 09:38 PM
Unfortunately, Automator (at least as of 10.4; maybe it'll be different in 10.5) lacks any direct ability to either select files based on date or to delete files. However, you can use Automator to run shell scripts, so a solution is possible.
I wrote up what I did in this macosxhints.com hint. It's not necessarily for a Terminal beginner, though it's really not bad. There are also some alternatives in the comments, one of which, Hazel, is a pure GUI solution that helps you create actions for folders to run automatically.
Either the linked hint or Hazel should help you accomplish what you want to do.
-rob.
I wrote up what I did in this macosxhints.com hint. It's not necessarily for a Terminal beginner, though it's really not bad. There are also some alternatives in the comments, one of which, Hazel, is a pure GUI solution that helps you create actions for folders to run automatically.
Either the linked hint or Hazel should help you accomplish what you want to do.
-rob.
Page 1 of 1



Sign In
Register
Help


MultiQuote
