I want to locate files from across a network. I’m fairly new to Applescript
Assuming the volume server is mounted and test_file.txt exists where it’s supposed to:
How come this works:
tell application “Finder”
if POSIX file “volumes/server/documents/test_file.txt” exists then
return true
else
return false
end if
end tell
The script returns true, which is what it should do.
But this doesn’t work:
tell application “finder”
set pathOfFile to “volumes/server/documents/test_file.txt”
if POSIX file pathOfFile exists then
return true
else
return false
end if
end tell
This returns false, even though the file exists. Why doesn’t applescript like the variable?
The reason I’m asking is I’d like to automate moving files between networked computers using afp:// .
Thanks!
Model: iMac 2009
AppleScript: 2.0.1
Browser: Firefox 3.5.3
Operating System: Mac OS X (10.5)