Applescript исключает типы файлов на ZIP
Мне нужно адаптировать appleScript, я должен исключить несколько типов файлов. Я думаю, что мне нужно что-то вроде -x ".fla", но я не могу заставить работать синтаксис.
on run {input, parameters}
if input is {} then -- no dropped items
tell application "Finder" to set input to selection as alias list
end if
repeat with x in input
set _path to POSIX path of x
tell application "Finder"
if kind of x is "Folder" then tell me to zipFolder(_path)
end tell
end repeat
end run
on zipFolder(theFolderPath)
do shell script "tDir=" & (quoted form of theFolderPath) & "; cd \"$tDir\"; aZip=\"../$(basename \"$tDir\").zip\"; if [ -e \"$aZip\" ]; then rm \"$aZip\"; fi; zip -r \"$aZip\" ./"
end zipFolder
Спасибо за любую помощь, которую вы можете оказать
1 ответ
Добавьте опцию исключения перед последней двойной кавычкой:./ -x *.fla"