Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Unmount selected disks' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Unmount selected disks
Authored by: sinjin on Oct 28, '04 02:37:42PM
Regarding the applescript by hypert, the following change will eject only selected disks. In trying it out I noticed that it will only eject ejectable items (iPods, dmg, shares, removable disks), so no need to exclude the startup volume or anything else for that matter. i.e. if you mistakenly select files or folders, the Finder seems to ignore them and continue ejecting everything else. Not sure how it deals with partitions, I don't have any.


tell application "Finder"
	set selectedDisks to selection
	repeat with myDisk in selectedDisks
		try
			eject myDisk
		end try
	end repeat
end tell

I have no idea if this covers the functionality of platon's original script (I suspect it may not), but present it as a solution that works for me.

[ Reply to This | # ]