我有一个包含.ipa文件路径的字符串:
set ipa_path to POSIX path of ipa_file现在我想:
所以对于我来说:
do shell script "unzip " & ipa_path到目前为止是对的吗?我今天才刚开始学AppleScript .
发布于 2012-02-28 17:19:54
你真的不需要AppleScript来完成这个任务。命令行zip实用程序有-r选项来替换压缩存档中的现有文件(具有相同的名称和相对路径)。以下是man page man zip的引语:
if foo.zip exists and contains foo/file1 and foo/file2, and the
directory foo contains the files foo/file1 and foo/file3, then:
zip -r foo.zip foo
will replace foo/file1 in foo.zip and add foo/file3 to foo.zip.当然,您仍然可以将对zip的调用包装在AppleScript do shell script命令中。
https://stackoverflow.com/questions/9484902
复制相似问题