I have this code
tell application "Finder" of machine "eppc://[email protected]"
open POSIX file "/Volumes/tmp/" & fileName
end tell
but when I execute it I get an error and log looks like this:
tell application "Finder" of machine "eppc://air.local"
open {file "Macintosh HD:Volumes:tmp:", "myfile 1:1.txt"}
--> error number -10010
end tell
Why?
The file is there but I wonder about the Macintosh HD part of the path. The volume is named that but in a POSIX path you start with /, not Macintosh HD, don't you? Also, I wonder about the "broken up" file path "Macintosh HD:Volumes:tmp:", "myfile 1:1.txt" - this doesn't look right?
(tmp is remote volume so it is correct that it is mounted under /Volumes/)
Note that the filename contains a colon.
You need coercion as Posix file instead of specifier.
Or, move the specifier out of Finder tell block:
The fact is that this specifier is a concept of a script, not a Finder application. This leads to the 3rd possible solution --- using the me keyword: