hi, I’m relatively new to Applescript. I’m getting a fair handle on it by dissecting examples, reading tutorials etc. and really enjoying using it. I’m sure this is fundamental but the following has so far eluded me.
I have a file path in string form, how do I convert it into a form that the Finder needs in order to see if the file exists?
Also assuming that works, and a duplicate file does exist, how do I get a reference to that duplicate?
thanks for any help
Nick
There are several different formats for path data; a string form is an acceptable one. You’re probably leaving off the class descriptor:
file "Hard Drive:First Folder:Second Folder:File Name"
so
tell app "Finder"
exists file "Hard Drive:First Folder:Second Folder:File Name"
end
or use the alias format (which is unrelated to those desktop items called aliases).
try
tell app "Finder"
alias file "Hard Drive:First Folder:Second Folder:File Name"
end
on error
-- file does not exist
end
I don’t understand this question. There is no special link betwen a file & its copy Where is the duplicate?