我需要修改一个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谢谢你能提供的任何帮助
发布于 2016-01-05 10:43:02
在最后一个双引号之前添加排除选项:./ -x *.fla"
https://stackoverflow.com/questions/34608204
复制相似问题