Wake up a NAS in WLAN

Hi,
So, I have the following situation:

  • I have a Synology NAS in my wifi, and one of its folders in the Dock. If its not connected, clicking it establishes the connection and opens the folder afterwards.
  • I created a Touch Bar action "Open folder" and pasted the path inside, as I'd like to have the same access there too.
    But the Touch Bar action fails, it opens the folder if the Disk is connected, but won't establish a connection if the NAS is previously "sleeping". Any idea how to make it work though? @Andreas_Hegenberg is this actually normal behaviour or should this go in the Bug report section?
    Thanks for any hint!

BTT just uses the openURL method of NSWorkspace. It might however be a bug in Finder?

Maybe try to use the "open" terminal command e.g. like this:

open ~/path/to/your/folder

(using the run terminal command action)

The hiccup is that the folder is recognised as a server by macOS.
So its location is
afp://name._afpovertcp._tcp.local/video
I can actually activate the NAS by opening the url afp://name._afpovertcp._tcp.local/video, but this ends up with an annoying plung when the folder opens.
How can I open this with a terminal command?

probably something like

mount_afp afp://name._afpovertcp._tcp.local/video /Volumes/mntpnt && open /Volumes/mntpnt
However I have not tried that.

Hmm… Unfortunately not. I'll look into it later on. Thanks nevertheless for the interest! I'll post the solution if I find one!

So, running a script like
mount volume "xyz" as user name "yzx" with password "zxy"
Works perfectly fine :smiley: Now I'll dig into it to see wether the NAS is already connected or not - either it should then run the mount volume, or just open a specific folder inside this NAS. Unfortunately a simple if mountedDiskName is in diskNames does not do the job. Solution (if found) will be posted below :wink: