I have this shell script that i want to perform on another machine.
get quoted form of (text 1 thru -2 of (POSIX path of (path to home folder)))
do shell script "/usr/bin/find " & result & " -ipath '*iTunes Music*.m4a'"
get POSIX file (first paragraph of result)
tell application "Finder"
open result
end tell
It works fine on a local computer, but when i try to play it on a network computer like this, i get an error “cannot get POSIX file”:
tell application "finder" of machine "eppc://xxx:xxx@xxx"
get quoted form of (text 1 thru -2 of (POSIX path of (path to home folder)))
do shell script "/usr/bin/find " & result & " -ipath '*iTunes Music*.m4a'"
get POSIX file (first paragraph of result)
tell application "Finder"
open result
end tell
end tell
Ok, so there was a problem getting POSIX in that second script, so I tried this:
tell application "finder" of machine "eppc://iandopps:dopps1@central"
get quoted form of (text 1 thru -2 of (POSIX path of (path to home folder)))
do shell script "/usr/bin/find " & result & " -ipath '*iTunes Music*.m4a'"
set place1 to (first paragraph of result)
end tell
tell application "finder" of machine "eppc://xxxxx"
open place1
end tell
It actually sets the variable,but not in the correct format. The true location is
The difference will not allow the finder to open the file.
So, here is my problem. The original shell cript runs on a network computer. But, it cannot get POSIX as first paragraph. The above script sets the first paragraph as a variable. But, this is not the exact location of the file because “HD” id left off, and there are “/” instead of “:”. So my question is,
Can I get the first POSIX thing to work in the first script.
OR
Can I get the correct location out of the variable in the above script?