# MacOS – How to tell AppleScript to read the contents of the “Network” Finder window

applescriptfindermacosterminal

I'd like to be able to get the contents of Finder's "Network" folder (Menubar–>Go–>Network). The folder contents here is different than /Network or /net.

The overall goal is to grep the names in this folder for a specific (unmanaged…) Mac in my environment. I don't know where it is, I just have the local host name. I was thinking about deploying a script to run dns-sd, but that binary is not too friendly to BASH script. Which is why I'm looking into Applescript now.

Can’t make «class cfol» "" of application "Finder" into type alias. (-1700)

No result was returned from some part of this expression. (-2763)