Want to highlight a helpful answer? Upvote!

Did someone help you, or did an answer or User Tip resolve your issue? Upvote by selecting the upvote arrow. Your feedback helps others! Learn more about when to upvote >

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Open an encrypted .zip

howdy.

how do you open an encrypted .zip file with an AppleScript ?

mac pro, Mac OS X (10.4.11)

Posted on Sep 5, 2009 9:41 PM

Reply
3 replies

Sep 6, 2009 10:46 AM in response to buddamint

How would you enter the password for an encrypted .zip ?


The best you can get is to prompt the user for the password within your script, then pass that to the command line unzip, e.g.:

set theZipFile to (choose file with prompt "Please select the zip file:")
set thePW to text returned of display dialog "Please enter the zip file's password:" default answer "" with hidden answer

do shell script "/usr/bin/unzip -P " & quoted form of thePW & space & quoted form of POSIX path of theZipFile

Open an encrypted .zip

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.