Macs usually come with a built-in compression tool called the Archive Utility that zips and unzips files. However, because this tool has relatively basic functionalities, other Mac users opt to use third-party apps. A quick check at the Mac App Store even shows over 50 apps that can be used for zipping and unzipping files.
But what is a zip file by the way?
What is a Zip File?
An archive file format, a Zip file is a collection of one or more files/folders that are compressed into one file for easier transfer and compression purposes. Despite it being a popular file format, many macOS users have reportedly encountered problems with it. According to them, they cannot unzip files in Mac because of the Unzip Error 22: Invalid Argument error message.
Now, before we discuss why the unzip error 22 happens in Macs and how to fix the unzip error 22: invalid argument issue, allow us to discuss everything you need to know about macOS file compression for you to better understand the process.
Pro Tip: Run a dedicated PC optimization tool to get rid of incorrect settings, junk files, harmful apps, and security threats that can cause system issues or slow performance.
macOS File Compression
Don’t bother looking for the Archive Utility in the Applications folder because you can’t find it there. Apple intentionally hid it because it’s a core service of the operating system. And when you say core service, it is used by Apple and macOS app developers to enhance the capabilities and features of an application. For instance, Mac Mail uses the Archive Utility to compress and decompress mail attachments. Safari, on the other hand, uses it to decompress downloaded files.
What’s great about this utility is that you can use it without having to launch it. But if you have a number of files to compress and decompress, you can conveniently open it, and then drag and drop files to it. You can access it by going to System > Library > Core Services > Applications.
Zipping a File/Folder
Compressing a file/folder is a relatively easy process. Simply follow the steps below:
- Open the Finder utility.
- Find the file or folder that you want to compress.
- Right-click on it and choose Compress from the list of options that appear.
- You will know if you have successfully compressed the file if you see a new file with the name of the item next to the word The new item should be named Compress [Item Name].
During the compression process, the selected file/folder is compressed. But the original file/folder is left intact. The compressed file/folder version will be stored in the same folder as the original file and will have a .zip file extension.
Zipping Multiple Files/Folders
Compressing multiple files/folders on your Mac is similar to compressing a single file/folder. The only noticeable difference is the name of the zip file generated.
To zip multiple files/folders on your Mac, here’s what you should do:
- Go to the folder that contains the folders/files you want to compress.
- Select all the items you want to compress. Shift + Click to select a range of folders or files. CMD + Click to select non-adjacent items.
- Once you have made a selection, right-click on any of the items and choose Compress.
- At this point, you already have a zipped file ready. It should have the word Compress in its file name, followed by the number of items selected and the file extension .zip.
Unzipping a File/Folder
Unzipping a file/folder is as easy as zipping one. Simply double-click on the zip file and it will automatically decompress in the same folder where the compressed file is stored.
If the item you decompressed contains more than one file, the decompressed item should retain the name of the original file. If a file with the same name already exists in the current folder, the decompressed file will have a number added to its name.
In case you didn’t know, there is another way to unzip a file/folder. It involves using Terminal, a built-in Mac program.
To use Terminal to unzip a file/folder, follow these steps:
- Open Use Spotlight to search for it.
- Into the text field, input unzip.
- Drag and drop the zip file into Terminal.
- Hit Enter and the file will be unzipped.
Why You Cannot Unzip Files
As perfect as this utility may seem, there are times when you can’t unzip files on your Mac because error messages like the Unzip Error 22: Invalid Argument pop up out of nowhere. Why do they happen? Here are a few reasons:
- Corrupted File – If you downloaded the ZIP file in a browser, there is a chance that it becomes corrupted, especially if you have closed the website prior to the download completion. Even though the file is already in the Download folder, you simply cannot open and unzip the file.
- Large File Content – Another possible reason why error messages appear while unzipping files on your Mac is that the file contains a large file.
- Permissions – In some cases, file permissions keep you from unzipping files. To resolve this, you may have to use third-party software.
- System Junk – Though rare, junk files may trigger the appearance of error messages associated with the Archive Utility.
How to Fix the Unzip Error 22: Invalid Argument Error
Are you looking for ways to resolve the Unzip Error 22: Invalid Argument error that appears while unzipping files on your Mac? If that is the case, then we cannot suggest a direct fix. What we recommend that you do is to try to unzip files using Terminal or simply perform a quick PC scan as junk and suspicious files might be keeping you from unzipping the files.
Unzip files using Terminal.
If double-clicking the file doesn’t work, you can try to unzip it using the Terminal utility. Perhaps, the file is too large that the decompress feature of the Archive Utility cannot handle it.
Don’t worry, though, because unzipping files in Terminal is easy. Just follow the steps below:
- Hold the CMD key and press Space to open Spotlight.
- Into the search bar, input Terminal and hit Enter.
- Unzip the file using the command: unzip filename.zip
- Press Enter and the file will be unzipped.
Perform a quick PC scan.
Still cannot unzip files? Try to perform a quick PC scan. It is possible that junk files are messing with important and core system processes, preventing you from executing or running utilities like Archive.
To perform a quick scan on your Mac, use a third-party Mac Repair tool like Mac repair app. Once the tool is downloaded and installed on your Mac, scan your system for any junk files and delete them. It should be easy-peasy!
Unzipping files on a Mac is easy as pie. All you need to do is double-click on the file and that’s it! The Archive Utility will take care of everything for you. However, if you fail to unzip files because of the Unzip Error 22: Invalid Argument issue, don’t panic. You can always try unzipping files using Terminal or just run a quick PC scan.
Do you know other ways to unzip files on a Mac? Share them below!