Mac OSX: Creating ‘Password Protected’ Zip Files

KB ID 0001357

Problem

Me to the office: Does anyone know how to create a password protected Zip file on a Mac?

Reply: Use Windows

Well actually this advice is ‘bobbins!’ Windows still can’t do this without installing an application, (I would recommend 7-Zip). But with a Mac of course you can 🙂

Solution

First open an Terminal window, then ‘change directory’ to the folder that contains the uncompressed file(s), or folder(s) you want to Zip.

Changing Directory With Spaces In Your Foldernames

I thought I’d better put this here, if you have spaces in your folder names, you use the following syntax;

Mac OSX Change Directory Foldername with a space

And repeat if you have multiple spaces like so;

Mac OSX Change Directory Foldername with spaces

Mac OSX: Create a Normal Zip File

Before we try and password protect a Zip, file let’s see how to create a simple one;

zip -r {Archive-Name}.zip {Folder-or-Filename-To-Add}

MAC Compress Folder to Zip in Terminal

Mac OSX: Adding Password Protection To Zip Files

Use the following syntax;

zip -e {Archive-Name}.zip {Folder-or-Filename-To-Add}

Enter and Confirm The Password

MAC OSX Create Password Protected Zip File

Related Articles, References, Credits, or External Links

NA

Author: PeteLong

Share This Post On

Submit a Comment

Your email address will not be published. Required fields are marked *