Shortcut to eject all external hard drives but not MobileBackups So far I've been using the following AppleScript to eject all external drives at once conveniently using a shortcut:
tell application &quot;Finder&quot;
    eject (every disk)
end tell

This script is is stored in /Library/Scripts and I have assigned a shortcut to trigger it in FastScripts.
But there's one problem. When you have Time Machine Backups enabled, OS X mounts a virtual MobileBackups volume in /Volumes to store local snapshots. This volume will be ejected alongside all the physical external volumes. I want to avoid this as this will stop local snapshots from being made (until it's mounted again at next login).
How can I add an exception to exclude /Volumes/MobileBackups in the AppleScript above?
You can do the following instead:

tell application "Finder"
  eject (every disk whose ejectable is true)
end tell


If you have partitioned disks mounted, hold down the 
"Option" key, run your script, then release the key when done.