Hi,
I can’t get this piece of script working in AppleScript Studio, it works in AppleScript though. It searches for file containing the name “test”
set theFolder to ":path:to:folder:" as alias
tell application "Finder"
items of theFolder whose name contains "test"
end tell
I prefer using shell commands in my script like this :
do shell script "find /path/to/folder -name test"
but it only finds names that are test and not for example thisistest.jpg. If this can be achieved with shell scripts, then it would be more useful to me but if it can’t then I’ll go with the script above.
-name pattern
True if the last component of the pathname being examined matches
pattern. Special shell pattern matching characters (['', ]‘’, *'', and ?‘’) may be used as part of pattern. These
characters may be matched explicitly by escaping them with a
backslash (``'').