Hi,
I need the help of some AS guru again
I want to process the content of a Finder folder by selecting the (top-level) subfolders that contain a certain internet location file. That is, I am looking for the equivalent of the following code:
set aFolder to path to documents folder -- For instance
tell application "Finder"
set theResult to the folder of (every internet location file of (entire contents of aFolder) whose name begins with "MyLink")
end tell
but restricted to the first level of the subfolder hierarchy. I have tried with
set theResult to the location of (every internet location file of (every folder of aFolder) whose name begins with "MyLink")
but it results in “Unknown object type”. Why? Is there a way to fix it?
Curiously enough (at least for me), the following variations are all correct:
tell app "Finder"
set theResult to the location of (every internet location file of (some folder of aFolder) whose name begins with "MyLink") -- Ok
set theResult to the location of (every internet location file of aFolder whose name begins with "MyLink") -- Ok
set theResult to the location of (every internet location file of (every folder of aFolder)) -- Ok
end
but, of course, they do not achieve what I want.