Using Applescript to zip and unzip a folder

不打扰是莪最后的温柔 提交于 2019-12-11 14:57:05

问题


I have never used applescript before and I'm trying to find out how to zip a folder on the desktop, that's all and it's giving me a hard time


回答1:


If you're happy to use Applescript to just invoke sh, you can use

do shell script "zip /Users/you/Desktop/out.zip /Users/you/Desktop/in.file"
do shell script "unzip -f /Users/you/out.zip"

(The -f option is "freshen", which will stop unzip from asking if you want to overwrite files. To always overwrite, use -o.)



来源:https://stackoverflow.com/questions/24183294/using-applescript-to-zip-and-unzip-a-folder

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!