首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Applescript排除zip上的文件类型

Applescript排除zip上的文件类型
EN

Stack Overflow用户
提问于 2016-01-05 09:29:23
回答 1查看 35关注 0票数 0

我需要修改一个applescript,我必须排除几种文件类型。我想我需要一些类似于-x ".fla“的东西,但我似乎无法让语法工作起来。

代码语言:javascript
复制
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

谢谢你能提供的任何帮助

EN

回答 1

Stack Overflow用户

发布于 2016-01-05 10:43:02

在最后一个双引号之前添加排除选项:./ -x *.fla"

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/34608204

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档