Need to open a password protected zip on Mac OSX?
Recently we were sent a password protected zip file at work. If you have ever tried to double click open a protected zip file you know that you will get an error not a password prompt.
If we ignore third party applications to open these files we are left with running the unzip command from terminal. You can use the option “-P password” where you replace the word password with actual password used to protect the file. An example command might look like:
unzip -P strong password ~/Desktop/secretzip.zip
This may have been good enough for me. But we have less technically inclined folks in our group who needed access to the provided files. So I made an Automator that everyone in the group could reuse for even future files. The Automator needed several features.
- Provide a GUI browser selection box to choose the protected zip file.
- Prompt for the password needed to unzip the file.
- Send the content to the user’s desktop regardless of whom ran it.
Here is how we build the Automator. The key components are the use of variables within Automator and a shell script object that takes the file and password as arguments that were provided by the user.




