Is there a 'unmount device' macro?

This script should do exactly that (well, it lists not only USB disks):

tell application "Finder" to set diskList to name of every disk whose ejectable is true
tell application (path to frontmost application as text) to set diskToEject to choose from list diskList with title "Eject Disk" with prompt "Select disk(s) to eject:" with multiple selections allowed
if diskToEject is not false then tell application "Finder" to eject diskToEject

Hold down ⌘ to select multiple disks.

Here as KM macro:

List and Eject Disks.kmmacros (2.0 KB)

3 Likes