Zipping files and folders not only makes it easier to share or manage files, it also decreases file sizes, saving room on your drive. Zipping files is something Mac OS X Yosemite can do without the need of any additional software. To create a basic ZIP file, use the Compress option in the Finder. If you want to password-protect your ZIP file, you can do that too, using a basic Terminal command. ZIP files created on a Mac can be opened on any computer, including other Macs and Windows PCs.
Compressing Files Without a Password
Launch a new Finder window and drag all of the files and folders you want zipped into a single folder. To create a new folder in Finder, select "New Folder" from the File menu.
Select the folder to be zipped and choose the "Compress" option from the File menu. Your Mac copies the contents of the folder into a new ZIP file. The original folder and its contents are untouched.
Double-click the ZIP file to extract its contents. The ZIP file remains in place as a duplicate of your original folder.
Creating a Password-Protected ZIP File
Gather all of the files you want zipped into a single folder. Move the folder into your User directory, located in the left menu of any Finder window.
Rename the folder if it contains any spaces. To do this, select the folder and press the "Return" key to make its name editable. Type the new name and press "Return" to save the change.
Launch the Terminal app, located in the Utilities folder inside the Applications folder. To quickly launch terminal, press "Command-Space" to open Spotlight Search, type "terminal" and press "Return."
Type the following command at the Terminal command prompt, replacing both instances of "abc" with the actual name of your folder:
zip -er abc.zip abc
This command creates a ZIP file called "abc.zip" from the "abc" folder in your User directory. The "-e" option password-protects the file. The "-r" option includes all sub-folders that may be in the folder you are zipping.
Enter the password when prompted, and then enter it again. When the command prompt returns, you can close the Terminal window.
Double-click the new ZIP file. A dialog box opens prompting you to enter the password you specified. Once you enter that password, the contents are decompressed.