TheLovelySausage
TheLovelySausage

Reputation: 4094

Using Applescript to zip and unzip a folder

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

Upvotes: 0

Views: 2451

Answers (1)

freshtop
freshtop

Reputation: 796

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.)

Upvotes: 1

Related Questions