2016-01-05 47 views
0

我需要修改一個applescript,我必須排除幾種文件類型。我想我需要像-x「.fla」這樣的東西,但我似乎無法使語法工作。Applescript排除zip上的文件類型

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 

感謝您的幫助,您可以給

回答

0

添加的最後一個雙引號之前排除選項: ./ -x *.fla"

相關問題