Password Protect a Zip File on Mac OS X
The simplest way to zip a file or folder on Mac OS X—and to password protect it—is to run the following command on the Terminal.
zip -er archive.zip /path/to/directory/
After running the command (and only if
/path/to/directory is a valid file or directory) you'll be prompted for a password. If you don't want to specify a password just omit the
-er part. And, also, you can compress multiple files by specifying a list of files at the end.
zip -er archive.zip file1.jpg /path/to/directory anotherFile.zip