I'm trying to make a script I can use to find all instances of a folder, be it on the root drive, external drive or mounted networked storage, and list all the contents in either a drop down box or a selectable list in a dialogue window.
To pseudo-code it:
tell application "Finder"
for (every instance of "*/Folder"
append items in "*/Folder" to contentsList
end for
end tell
I honestly have no idea how to actually do it in AppleScript since it doesn't natively have for loops, and I'm not sure about adding items to arrays in AppleScript.
Is anyone able to give me any pointers? Alternatively, being able to do the same in a shell script would be just as good.
Thanks in advance!