Exclude Items From Time Machine Backup With Contextual Menu
Mac OS X — 14 Jun 2008 08:12 — 774 days ago

Note: there’s an updated version of this script.

I often download huge files that I only need temporarily, things like installer packages and disk images. They end up on my desktop because that is my download folder and quite often they also end up in the Time Machine backup, wasting a lot of space there.

I wanted a contextual menu command to exclude these files from the backup in the Finder so I wrote this AppleScript:

on main(filelist)
    set target to quoted form of (POSIX path of (item 1 of filelist as alias))
    do shell script "xattr -w com.apple.metadata:com_apple_backup_excludeItem com.apple.backupd " & target
end main

It adds extended attributes to the file telling Time Machine to ignore it. I got this information from an excellent article about Time Machine.

To run the script as contextual menu in the Finder I use Ranchero Software’s free Big Cat utility. After installing that and storing my script in $HOME/Library/Application Support/Big Cat Scripts/Files, I have a new entry in the Finder contextual menu for files:

Finder Contextual Menu AppleScript

The only problem is that custom contextual menu items are in a “More” submenu on Leopard, which moves the Big Cat scripts down to the inconvenient third level.


Comments
Posted by peter on 4 Aug 2008 18:58

'The only problem is that custom contextual menu items are in a "More" submenu on Leopard,
which moves the Big Cat scripts down to the inconvenient third level.'

Maybe this can be changed by using OpenMenu X? Just a thought.

http://www.artman21.com/en/openmenu_x/

Posted by Marc on 5 Aug 2008 22:34

OpenMenu X looks good, I didn't know that. I'll try it out to see if it's worth its price...

Powered By blojsom