The Omni Group
These forums are now read-only. Please visit our new forums to participate in discussion. A new account will be required to post in the new forums. For more info on the switch, see this post. Thank you!

Go Back   The Omni Group Forums > OmniFocus > OmniFocus 1 for Mac
FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
Backup Cleanup Thread Tools Search this Thread Display Modes
I've written to you about this during the Beta... no reply, no implementation in the app. So, here we go again: OmniFocus should only keep a number of backups. My backup folder is too large by now and I'm sick and tired of having to clean it out myself. Please provide a preference for the user to decide how many backups to keep and let OmniFocus delete the older ones upon quit.
 
I'll second that - I just checked my backup folder and found countless backups. I suppose an automator task could be written to delete the files periodically.
 
How about setting up a repeating action to clean up the backup folder in OmniFocus. :0

BZ
 
I use Hazel to clean up my backups. It works quite well and is handy for other things as well.

Still, some kind of preference in OF would be nice.

Last edited by Toadling; 2008-01-26 at 08:46 AM..
 
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
 
@ptone

I came over from the dark side a couple of years ago (Windoze), but have never got into scripts. I have no-one here to learn from either - the joys of living on a small island.

To use your script in an automated way would I add it as a Folder Action to the OF Backups folder?

Thanks

Andy
 
Andy,

The easiest route would be to just use a program that helps you automate things, like the above mentioned Hazel. Or a free alternative:
http://www.tomhancocks.com/?p=63

Next on the ease of use ladder would be to take the Applescript snippet above and build it into an automator action.

You could save the snippet as a script in script editor and add it to the OF toolbar (see the extras forum for more info on how that can be done)

Finally the Unix command can be added to a file that the computer will run every night at midnight. located in /etc/daily.local

None of the above options are explained enough to follow as a step by step set of instructions, but depending on how much you want to learn, you can pick from top to bottom ;)

Good luck - there are lots of resources out there for learning about Applescript and shell scripting.

-P

Last edited by ptone; 2008-02-02 at 09:48 AM..
 
Folks,

All your suggestions on how to solve the mess OmniFocus leaves behind are welcome. However, I don't intend to buy another app nor become proficient in AppleScript (which after 20 years of running Macs I never got into). There're apps out there that provide an option on how many backups are kept... why not OmniFocus? C'mon guys... it can't be that difficult to implement such feature.
 
Thanks ptone. I started looking at attaching the script to a folder action and it didn't work. I have downloaded some more information on folder actions so I will have a look at that as I have piqued an interest and then work through your list.

@gryphonet - I am sure that this will be on the development teams list of To Dos. If not it should be!!

Thanks again.

Andy
 
I went with Hazel in the end as File Action doesn't look for file dates etc.

Hazel has turned out to be an excellent purchase - so good that I got the family version.

Last edited by Dogsbreath; 2008-02-04 at 12:37 PM.. Reason: Adding more information
 
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Big Cleanup problem -new user need help tazmund OmniFocus 1 for Mac 2 2010-07-14 02:18 PM
Cleanup help kman42 OmniFocus 1 for Mac 12 2010-04-22 03:46 PM
Cleanup is not cleaning joeworkman OmniFocus 1 for Mac 4 2008-07-17 09:54 PM
Where is auto-cleanup? santra OmniFocus 1 for Mac 1 2008-03-24 03:52 AM
Confused about cleanup santra OmniFocus 1 for Mac 5 2007-09-30 08:34 PM


All times are GMT -8. The time now is 08:27 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2019, vBulletin Solutions, Inc.