I need to use unix “find” command in one AppleScript.
Is there a way to exclude one folder from result? I dont want it to scan Time Machine “Backups.backupdb” folder at all.
I need to use unix “find” command in one AppleScript.
Is there a way to exclude one folder from result? I dont want it to scan Time Machine “Backups.backupdb” folder at all.
Hi,
from the man page
-path pattern
True if 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 (\''). Slashes (
/‘’) are treated as normal characters and do not have
to be matched explicitly.
try this
do shell script "/usr/bin/find /Volumes/myVolume ! -path '*Backups.backupd*'"