AppleScript unmount SMB share

M

mkanfer

Guest
I am new to Applescript and have written a script to mount an SMB share

tell application "Finder"
open location "smb://172.16.0.40/vol1"
end tell

I am not able to figure out how to write one to unmount the share. Can someone help me?

Thanks!
 
Joined
Mar 30, 2004
Messages
4,744
Reaction score
381
Points
83
Location
USA
Your Mac's Specs
12" Apple PowerBook G4 (1.5GHz)
Finder's AppleScript dictionary said:
eject v : Eject the specified disk(s)
eject [specifier] : the disk(s) to eject

So

Code:
tell application "Finder"
	eject "vol1" --replace with whatever your volume is called
end tell
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top