Please can someone help me with this small query. I’m trying to find out if a folder exists in a particular folder. I’ve already done this by getting he contents of the folder and looping through all the names, but I wanted to try and shorten it and make it look a little more tidy.
Here’s the sort of thing I’m trying to do:-
tell application "Finder"
if exists (folder whose name is "NAME" as text) of folder "MAC HD:FOLDER:FOLDER:" then
-- DO THIS
end if
end tell
I’ve tried a number of variations on this but I think I must be getting my references wrong or syntax mixed up.
It’s not another way of looking at it. It looks like, from the script you posted, that you were looking for a folder named “NAME” inside folder “MAC HD:FOLDER:FOLDER:”
(folder whose name is “NAME” as text) of folder “MAC HD:FOLDER:FOLDER:”
and using the filter reference form rightly would not be necessary.
Maybe Stefan forgot to put the “NAME” folder in the path.