OK, found an even better, GUI based way to do this for Free. Check out Keka opensource. give it a password, drag, drop, done!
Posted by Pierre Igot in: Macintosh
March 31st, 2010 • 10:08 am
Mac OS X’s user interface comes with a built-in facility for creating Zip archives, in the form of a command called “Compress…” in the Finder’s “File” menu or in the contextual action menu. (I believe the command used to be called “Archive…” in versions of Mac OS X prior to Mac OS X 10.5, also known as Snow Leopard.)
It works fine for creating simple Zip archives that can then be shared with other Mac or PC users.
But this facility provides no option to create a password-protected or encrypted Zip archive.
I know that you can purchase a third-party tool such as StuffIt Deluxe that provides such an option. But this third-party product is too expensive and feature-rich for my tastes. In addition, the StuffIt product family does not have a very good history under Mac OS X. Its interface is very lousy (especially for decompressing password-protected Zip archives, among other things) and there have been pretty significant bugs in the past.
The truth is that Mac OS X comes with its own feature for creating password-protected or encrypted Zip archives. It’s just that it’s not accessible in the graphical user interface (GUI). You have to use the command line interface.
As per usual in the CLI world, the most simple things are not obvious and if you bring up the
manpage in Terminal for the
zipcommand, you will spend a fair bit of time figuring out exactly which options you need.
Since I went through this myself two days ago, I thought I would share the result of my investigations. As far as I can tell, in order to create a password-protected and encrypted archive of a folder, you need to type this in Terminal:zip -ejr [name] [path to folder]
[name]is the name you want to give to the resulting archive file (without the “.zip” extension, which the
zipcommand will add automatically).
[path to folder]is the complete name of the folder with its full path. Instead of typing it, you can just type
zip -ejr [name]followed by a space and then drag-and-drop the target folder onto the command line. Terminal will automatically insert the full path with escape characters if required.
For your information, the “
e” option stands for “encryption,” the “
j” for “junk the path” (otherwise the
zipcommand will archive the complete folder hierarchy leading to your target folder, which you probably don’t want), and “
r” stands for “recursive,” which will force the
zipcommand to include the entire contents of the folder in the archive. (Otherwise it will only archive the folder itself without its contents, which is not exactly useful.)
Once you execute this command, Mac OS X will ask for the desired password (twice, for confirmation), and then create a Zip archive of your folder with your chosen name at the root level of your home folder. (If you want to specify a different location, you need to provide the full path instead of just the name.)
It’s not fantastically user-friendly, but it’s far cheaper than StuffIt Deluxe, and at least it does not have a lousy GUI.
DISCLAIMER: I am not a CLI expert and there might be a better/more efficient way to do this. But this works for me.
This entry was posted by Pierre Igot on Wednesday, March 31st, 2010 at 10:08 am and is filed under Macintosh. You can follow any responses to this entry through the RSS 2.0 feed. Responses are currently closed, but you can trackback from your own site.Previous Post: Pages ’09: Custom scripts and keyboard shortcuts
Next Post: Customizing Pages ’09: System Events and modifier keys
Comments are closed.
Very useful for creating a secure password ZIP file in the cloud (like saving to DropBox – even if they break into DropBox, they gotta get through the encrypted ZIP file).
BTW – the default expander for MAC doesn’t work for expanding this file, you need Stuffit Expander to get to it.