property exceptions : "iTunes Disk" --Add exceptions here.
set the_items to do shell script ("ls /Volumes/")
tell application "Finder"
repeat with each_volume in (every paragraph of the_items as list)
set each_volume to each_volume as string
set the_path to (":Volumes:" & each_volume) as alias
if the_path is local volume then
if the_path is not startup disk then
if exceptions does not contain each_volume then
eject the_path
end if
end if
end if
end repeat
end tell
Friday, September 18, 2009
Eject All Disks With One Click
I have written a simple AppleScript to eject all mounted volume except your boot drive. The text of the script is:
Labels:
AppleScript,
Finder
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment