使用AppleScript来压缩和解压缩的文件夹 [英] Using Applescript to zip and unzip a folder
本文介绍了使用AppleScript来压缩和解压缩的文件夹的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我从来没有AppleScript的使用过,我试图找出如何压缩在桌面上的文件夹,这一切都和它给了我一个困难时期
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
推荐答案
如果你乐于使用AppleScript的只是调用SH,您可以用
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"
(即 -f
选项是清新,这将要求停止解压
如果你想覆盖文件要始终覆盖,使用 -o
)
(The -f
option is "freshen", which will stop unzip
from asking if you want to overwrite files. To always overwrite, use -o
.)
这篇关于使用AppleScript来压缩和解压缩的文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文