Member
2008-01-26, 01:19 PM
Here is a quick script, if your backups are not stored in the standard location, or you want to keep more than 15 days worth of backups, change accordingly.
Code:
tell application "Finder"
set OFBackup to ((path to (documents folder) as string) & "OmniFocus Backups:") as alias
delete (every item of OFBackup whose creation date is less than ((current date) - (15 * days)))
end tell
Or for those that want to one line of shell script:
Code:
find ~/Documents/OmniFocus\ Backups -type d -name "*.ofocus" -mtime +15 -print0 | xargs -0 rm -r
You could add that one line to your /etc/daily.local file and it will run nightly.
(or create your own cron entry)
-P
Last edited by ptone; 2008-01-26 at 01:41 PM..
Reason: added bash option