| 13. Unmount multiple volumes |
This task unmounts multiple (or every removable, every disk image) volumes at once.
(Trigger)
1. Hot key (Optional)
Or set other appropriate trigger to unmount volumes.
(Action)
1. Unmount Volume
Choose volume to be unmounted. This action can be created as many as user needs.
2. AppleScript (Optional)
Or it's available to unmount every removable volume with following script.
tell application "Finder"
if ((count of disks) > 1) then
set allDisks to disks whose ejectable is true
repeat with eachDisk in allDisks
try
eject eachDisk
end try
end repeat
end if
end tell
To unmount every disk image...
tell application "Finder"
if ((count of disks) > 1) then
set allDisks to disks whose ejectable is true and journaling enabled is false and ignore privileges is true
repeat with eachDisk in allDisks
try
eject eachDisk
end try
end repeat
end if
end tell
|