I have a bash script which will be run on a Mac via ssh. The script requires a particular network drive to already be mounted. On the Mac, I mount this drive by opening a folder "JPLemme" on that drive in Finder. This mounts the drive until the Mac goes to sleep at night.
Obviously, Finder isn't available via ssh, so I want to create an AppleScript that will simulate what I do through the GUI. I've tried:
tell application "Finder"
activate
open "JPLemme"
end tell
I receive the following error:
execution error: Finder got an error: Can't get "JPLemme". (-1728)
I assume I'm missing something obvious, but Google has failed me. I would also be willing to entertain better solutions like mounting the drive directly; I've avoided that approach because I don't want the Mac to choke trying to mount the drive a second time after I've already mounted it in an unexpected way. (I don't really like Macs or AppleScript...)