How to Eject All External Partitions Quickly? I have an external disk with two partitions on it that I keep plugged into my MacBook Pro when I'm at my desk. (One is for Time Machine, the other just for extra storage.) Sometimes I need to grab my laptop quickly and take it somewhere, but I have to change to a space where I can see the partitions on the desktop, lasso them, two-finger click, and select Eject. Is there a faster way under Mavericks, or do I have to set up an AppleScript like this one with a keyboard shortcut?

Note: I'm not looking to eject these only when I put my Mac to sleep (as explored here). Sometimes I'm on a screen-sharing telecon and I have to take my Mac away from my desk for a minute, if you know what I mean :-).
The only caveat to "quickly ejecting" disks with any reliability is that they will not eject if there are files in use which reside on them. That said, you can force eject disks, but that would not be ideal if files are, in fact, in use.

Easiest way to instantly eject all disks is by invoking an Applescript (could also create a shell script, but Applescript is more easily turned into a one-click application solution). 

So go to your Applescript Editor, paste in the following:

tell application "Finder" to eject (every disk whose ejectable is true and local volume is true and free space is not equal to 0)




and save the script as an application wherever you choose (do NOT use the /tmp folder as illustrated). Add the resulting application to your Dock, and you have a one-click Quick Eject.



Note: the and free space is not equal to 0 portion is so that the script doesn't eject the contents of your CD/DVD drive. Remove that if you would like any inserted disks ejected as well.