R – AppleScript: adding mounted folder to Finder Sidebar


I have a simple Apple Script that mounts a folder:

mount volume smb://machineip/folder

This runs on start up since Mac OS X 10.5.5 doesn't have the concept of mapped drives like Windows. The script doesn't go as far as I'd like though. I get the machine IP added to Finder Sidebar and when I click it, all of the shared folders for that machine appear, including the above "folder" with the little eject icon. How do I get that folder to appear under "Devices" in Finder Sidebar using Apple Script.

Is there a way to also do this through the Automator?

Best Solution

You might want to look into using the fstab instead of a mount script. Check here for how to go about this. If you want to have mounted folders available on the sidebar of Finder, you probably can just drag the /Volumes/(name) folder to your places bar.

Related Question