Return to site

How To Zip A Folder On Mac

broken image


Image credit: Mia Baker

  1. How To Create A Zip File
  2. How To Create A Zip Folder On Mac

From time to time, we have to deal with zip files in our day-to-day work. Maybe your friend sends you a zipped archive of photos of the party you were in last week or maybe your colleague sends you a file of documents. It's not that often, but it happens. Moreover, zip files are very useful, when sending emails using Google Mail, because there's a limited amount of space that is allowed to be sent. If you're running windows, there's no big of a deal, unzipping the files. But what about Mac?

Have you ever opened a zip file on Mac? Do you know the best way to do that? There are three main methods for it. You can use built-in utilities, Terminal or third-party apps. In this article, we'll cover best zipping and unzipping options available for your Mac.

The Common Way

A window will appear indicating that your Mac is compressing the files or folders. Depending on the size of the files or the folders, this could take a couple minutes. Once your Mac has finished compressing the files or folders, you'll see a nice little zip file. This contains all of the files and folders you selected to be compressed. Zipping files on Apple/Mac is a chore because of all the hidden files and folders added by macOS. Like.DSStore and MACOSX are two of the most common files and folders that are added to zip files when compressed on macOS.

How To Create A Zip File

Image credit: Domenico Loia

The common way to zip and unzip files is by using your Mac's Archive Utility, which can be accessed through Applications > Utilities folder. Archive Utility has the basic file compression functionality. You can quickly zip and unzip files and folders, to send to your friend or upload to Dropbox.

How To Create A Zip Folder On Mac

Archive Utility can easily zip single files and folders, by right-clicking it and choosing Compress function. When compressing multiple items, the process is about the same, with only a few minor differences. Instead of showing a name of file or folder that is being compressed, in the pop-up menu, the word Compress will be followed by the number of items that are being selected. Moreover, the zip file will be automatically called Archive.zip and will be stored in the same folder as the files you were compressing.

If you want to unzip your files, the process is, all the same, just reversed. You simply right-click the zip archive, choose 'Open with' and then select Archive Utility. Moments later, the archive will be unzipped. The only downside is that Archive Utility has only these two functions – compressing and decompressing. If you would want to preview the content of your archive, protect it with a password, merge the archives or use the extended range of file types like RAR, you'd need special tools. Luckily for you, there's a vast selection of those tools. You can check 'Setapp' guide called The Easiest Way to Archive Files on a Mac to learn more.

Compressions Tips Using Terminal

Archive Utility's lack of functionality can be fixed by using the Terminal. Have you ever used the Terminal on your Mac? If you're not a programmer, chances are you haven't. The reason is that it's not that user-friendly. Instead, you can search third-party apps, that covers all the functionality of the Archive Utility, but at the same times packs high-end features.

These features can be adding comments to the archives and deleting files from archives without unzipping it. Moreover, most of the apps are fully integrated with the macOS workflow so they will work without problems. You can also find applications for zipping and unzipping files that suggest passwords for you to use to encrypt archives.

Creating an Encrypted Archive

Image credit: Max Nelson

Computer security is a very valuable thing in today's digital world. Unfortunately, Apple's Archive Utility doesn't offer ZIP archives' encryption with a password. The good thing is that there's a way to do it if needed. The bad thing is that to do that, you'll need to use the Terminal. To do so, you'll need to open the Terminal, which can be easily accessed by pressing command + spacebar and typing 'Terminal' into the search bar. In the opened window follow these actions:

  1. Type the following command: (single space) zip -e ~/Desktop/Archive.zip
  2. Drag the folder containing the files you wish to archive to the Terminal window and the command will look like this: zip -e ~/Desktop/Archive.zip /path-to-folder
  3. Lastly, press Enter and create a password to use for the archive and the encrypted file will appear on your desktop.

This process might look and feel a bit complicated and inconvenient, but if you need to use encryption only once or twice there's no need to look for other alternatives. For those people who are encrypting files regularly, a third-party app is a must. It will make the process of encrypting archives effortless and much faster.

Related Posts

Folder

Zipping files on Apple/Mac is a chore because of all the hidden files and folders added by macOS. Like .DS_Store and __MACOSX are two of the most common files and folders that are added to zip files when compressed on macOS.

Djvu reader pro 2 3 9 free. The folder named __MACOSX especially is problematic because it contains duplicates of every file in the zip archive. So for example, if you use Finder to compress 20 files, the resulting zip file will contain the original 20 files, plus an additional 20 files all hidden under the /__MACOSX/ folder.

It's a real pain and can be confusing to deal with because when you unzip the files on a Mac, the hidden files and folders are not included in the unzipped files. So you won't be able to view them, even after you enable display of hidden files. The only way to view all the hidden files/folders is to open the zip file on a non-Mac machine, like PC/Windows or Linux.

Hidden Files: To view hidden files on PC/Win, visit View Options in File Explorer. To view hidden files on Mac, the easiest way is to use a free app like Funter.

Hidden Files

Here are some screenshots showing the hidden files and folders that are included for any folder compressed (zipped) on macOS. First screenshot shows the hidden __MACOSX directory, which is visible on PC when you open the zip file.

On PC/Win the hidden files (like __MACOSX) are visible

The next screenshot shows the set of duplicate files and folders that are included in zip files compressed on macOS. Notice the file names, each begin with a dot ., which makes the files hidden by default on most systems.

Mac includes hidden duplicates of every compressed file (viewed on PC)

Now compare those previous screenshots (taken on PC) with the following screenshot (taken on Mac). Even with 'show hidden files' enabled, the hidden __MACOSX folder and all the hidden files are not included (i.e., they do not exist hidden or otherwise) in the unzipped archive.

Mac excludes all hidden macOS files when opening zip archives (view hidden files enabled)

So again, all the hidden files/folders added by Mac are included in the unzipped files ONLY when the files are unzipped on non-Mac machines. Thus the confusion: Why on earth are the hidden files added in the first place? They are completely excluded when unzipping on Mac, and never needed for any reason on any other machine. In fact quite the opposite: the hidden files serve NO purpose other than to waste bandwidth, time, energy, resources, etc. Djay pro 2 0 12 inch.

Why does macOS include hidden files in zip archives? It makes absolutely zero sense.

Real Problems

This is a real problem because many people use Mac to zip files to share on the Web. Problem is that not everyone uses a Mac. So anyone downloading your zip files on their Windows, Linux, or other non-Mac is going to see all those hidden files and folders. Which are utterly useless to non-Mac devices and users.

Further, by adding a duplicate set of hidden files to the zip archive, Mac essentially is doubling the size of the download zip file, which of course wastes bandwidth, disk space, and everything else. May not be a huge deal for smaller zip files, but we're talking about potentially millions or billions of zip files downloaded every day, needlessly bloated with useless data.

Web Devs: The hidden __MACOSX directory and its duplicate set of files can cause problems with things like installing WordPress plugins and other applications. So if you are WordPress/Web developer, use a version-control system to manage and package/zip your files. That way you keep all the hidden junk completely out of the picture. Alternately if you aren't using version control, you can remove/exclude unwanted hidden files using one of the techniques below.

Real Solutions

Fortunately, all the hidden garbage is not needed on any machine — including Mac — so it's all 100% totally safe to delete. So regardless of which machine/OS you are using, you can safely delete __MACOSX and .DS_Store from any zip archive. The files literally are useless. Can t transfer files from mac to external hard drive. Read on to learn some different techniques for removing the __MACOSX and .DS_Store from ZIP Files on macOS.

PC/Win users: The techniques below explain how to remove/delete unwanted hidden files on Mac. If you are using PC/Win, you can simply open the archive and delete any unwanted hidden files.

Use software to exclude hidden files from NEW zip archives

For new files, you can use an app such as YemuZip or any free alternative to zip compress new files without any hidden junk.

I don't know of any apps that can retroactively remove hidden files/folders from existing zip files. If you know of any, drop a comment or send via contact form.

Use an app like YemuZip or free alternative to compress/zip without any hidden files

Use command line to exclude hidden files from NEW zip archives

On Mac you can use Terminal to easily remove all of the hidden files/folders from existing zip files. Here are some techniques that I use for my own projects.

When creating new ZIP archives, you can use the zip command to compress/zip files without any hidden files like .DS_Store and __MACOSX. Here are the steps:

  1. Open the Terminal app
  2. Navigate to the folder that contains the files you want to zip
  3. Type or paste the following command into Terminal*:
  4. Press Enter to execute and done.

The resulting zip archive will be named data.zip and located in the same directory as the original uncompressed files. The data.zip archive will not include any __MACOSX or 'dot-hidden' files (i.e., file names that begin with a literal dot).

*Important: The above command will remove all Is it safe to download fortnite on pc. Switchresx 4 9 100. dot-hidden files, including files like .htaccess and other common/useful files. So if you want to keep some hidden files and only remove the ones added by macOS, use this command instead:

Tip: Use the cd and ls commands to navigate in Terminal.
How to zip a folder on macbook

Zipping files on Apple/Mac is a chore because of all the hidden files and folders added by macOS. Like .DS_Store and __MACOSX are two of the most common files and folders that are added to zip files when compressed on macOS.

Djvu reader pro 2 3 9 free. The folder named __MACOSX especially is problematic because it contains duplicates of every file in the zip archive. So for example, if you use Finder to compress 20 files, the resulting zip file will contain the original 20 files, plus an additional 20 files all hidden under the /__MACOSX/ folder.

It's a real pain and can be confusing to deal with because when you unzip the files on a Mac, the hidden files and folders are not included in the unzipped files. So you won't be able to view them, even after you enable display of hidden files. The only way to view all the hidden files/folders is to open the zip file on a non-Mac machine, like PC/Windows or Linux.

Hidden Files: To view hidden files on PC/Win, visit View Options in File Explorer. To view hidden files on Mac, the easiest way is to use a free app like Funter.

Hidden Files

Here are some screenshots showing the hidden files and folders that are included for any folder compressed (zipped) on macOS. First screenshot shows the hidden __MACOSX directory, which is visible on PC when you open the zip file.

On PC/Win the hidden files (like __MACOSX) are visible

The next screenshot shows the set of duplicate files and folders that are included in zip files compressed on macOS. Notice the file names, each begin with a dot ., which makes the files hidden by default on most systems.

Mac includes hidden duplicates of every compressed file (viewed on PC)

Now compare those previous screenshots (taken on PC) with the following screenshot (taken on Mac). Even with 'show hidden files' enabled, the hidden __MACOSX folder and all the hidden files are not included (i.e., they do not exist hidden or otherwise) in the unzipped archive.

Mac excludes all hidden macOS files when opening zip archives (view hidden files enabled)

So again, all the hidden files/folders added by Mac are included in the unzipped files ONLY when the files are unzipped on non-Mac machines. Thus the confusion: Why on earth are the hidden files added in the first place? They are completely excluded when unzipping on Mac, and never needed for any reason on any other machine. In fact quite the opposite: the hidden files serve NO purpose other than to waste bandwidth, time, energy, resources, etc. Djay pro 2 0 12 inch.

Why does macOS include hidden files in zip archives? It makes absolutely zero sense.

Real Problems

This is a real problem because many people use Mac to zip files to share on the Web. Problem is that not everyone uses a Mac. So anyone downloading your zip files on their Windows, Linux, or other non-Mac is going to see all those hidden files and folders. Which are utterly useless to non-Mac devices and users.

Further, by adding a duplicate set of hidden files to the zip archive, Mac essentially is doubling the size of the download zip file, which of course wastes bandwidth, disk space, and everything else. May not be a huge deal for smaller zip files, but we're talking about potentially millions or billions of zip files downloaded every day, needlessly bloated with useless data.

Web Devs: The hidden __MACOSX directory and its duplicate set of files can cause problems with things like installing WordPress plugins and other applications. So if you are WordPress/Web developer, use a version-control system to manage and package/zip your files. That way you keep all the hidden junk completely out of the picture. Alternately if you aren't using version control, you can remove/exclude unwanted hidden files using one of the techniques below.

Real Solutions

Fortunately, all the hidden garbage is not needed on any machine — including Mac — so it's all 100% totally safe to delete. So regardless of which machine/OS you are using, you can safely delete __MACOSX and .DS_Store from any zip archive. The files literally are useless. Can t transfer files from mac to external hard drive. Read on to learn some different techniques for removing the __MACOSX and .DS_Store from ZIP Files on macOS.

PC/Win users: The techniques below explain how to remove/delete unwanted hidden files on Mac. If you are using PC/Win, you can simply open the archive and delete any unwanted hidden files.

Use software to exclude hidden files from NEW zip archives

For new files, you can use an app such as YemuZip or any free alternative to zip compress new files without any hidden junk.

I don't know of any apps that can retroactively remove hidden files/folders from existing zip files. If you know of any, drop a comment or send via contact form.

Use an app like YemuZip or free alternative to compress/zip without any hidden files

Use command line to exclude hidden files from NEW zip archives

On Mac you can use Terminal to easily remove all of the hidden files/folders from existing zip files. Here are some techniques that I use for my own projects.

When creating new ZIP archives, you can use the zip command to compress/zip files without any hidden files like .DS_Store and __MACOSX. Here are the steps:

  1. Open the Terminal app
  2. Navigate to the folder that contains the files you want to zip
  3. Type or paste the following command into Terminal*:
  4. Press Enter to execute and done.

The resulting zip archive will be named data.zip and located in the same directory as the original uncompressed files. The data.zip archive will not include any __MACOSX or 'dot-hidden' files (i.e., file names that begin with a literal dot).

*Important: The above command will remove all Is it safe to download fortnite on pc. Switchresx 4 9 100. dot-hidden files, including files like .htaccess and other common/useful files. So if you want to keep some hidden files and only remove the ones added by macOS, use this command instead:

Tip: Use the cd and ls commands to navigate in Terminal.

Example

To give this a real-world example. Let's say you have a folder on your desktop called Folder that includes a bunch of files that you want to zip/compress.

First, open terminal and write following commands:

Now you have a file called data.zip on your desktop that does not include any __MACOSX or .DS_Store files. I.e., a nice clean zip file with no hidden garbage.

Use command line to remove hidden files from EXISTING zip archives

The above techniques show how to exclude hidden files when creating new zip archives. But what if you want to remove hidden files from an existing zip archive? Easy. In Terminal, navigate to the directory that contains your zip file and enter the following two commands:

And/or if you have multiple zip archives in some folder, and want to remove all hidden macOS files from all of them in bulk. Use Terminal to navigate to the folder and enter the following commands:

I use this technique for zip files I serve here at Perishable Press and elsewhere.

Tip

For a 'quieter' Terminal experience, you can add the q (quiet) or qq (quieter) parameter to the previous bulk-delete command:

Cheers people.

Jeff Starr = Web Developer. Security Specialist. WordPress Buff.




broken image