The most common compression format in use is a ZIP file. It is important to learn how to fix corrupted ZIP files on a Mac and PC. There are many reasons they can become corrupted, such as a virus or errors with the compression process. In this comprehensive guide, you will find strategies and tips to help you recover important data from damaged ZIP archives.
Image credit: Unsplash
What is a ZIP file and how do you unzip it?
A ZIP file is a compressed file that’s small enough not to take up too much space on your computer. It is easier and faster to download. Both MacOS and Windows have built-in compression tools to create ZIP files. The type of compression is lossless which means that no information is lost in the compression process.
You can manage and unzip ZIP files on your Mac by using its built-in Finder, the Archive Utility and Terminal. For a zip folder Mac Terminal offers easy unzipping of ZIP files. Go to Finder>Utilities>Terminal and enter the command Unzip [filename]. This is more than adequate if all you want to do is unzip ZIP files on a Mac. The Archive Utility has several limitations, such as not allowing a preview of files before extraction. Using third-party apps may be preferable if you want to preview files before extraction, take only one file out of an archive, and more.
How to repair ZIP files on a Mac
If you see an error message when trying to open a ZIP file it is probably corrupted. You will need to repair the Zip file before you can access it. If you are using a Mac, you can use the Terminal app to repair it. This can be effective but you may be uncomfortable using it as you need to use command-line activities.
- Find the Terminal app in the Utilities folder
- Type the command: Zip -f [filename]. Zip –out [output_filename].zip
- Terminal will ask you if this is a single-disk archive
- Type Y for yes, and press Return
Terminal will extract what it can from the damaged archive. You can also use the line command: ZIP -FF [filename]. Zip –out [output_filename].zip. This activates the Fix Archive with more effort. Terminal will build a new archive when the Zip archive is corrupted with the output file name you supply.
There are a number of high-quality third-party apps, such as Archiver that you can use to fix corrupted ZIP files. Many of them have user-friendly interfaces and make it easier to fix damaged files than when using the Terminal app.
Image credit: Unsplash
How to repair ZIP files on a PC
Re-download the ZIP file. Repairing a ZIP file on a PC may be as simple as downloading it again. Make sure you delete the possibly corrupted file from your computer before you try this. Open the source of the ZIP file again and re-download it. Save it to the location where you want it on your computer and try to open it again.
Remove and reinstall your compression tool. This can help if the software has errors. You will locate the software in the Apps and Features folder. Select the program and click on Uninstall. Now you need to download and install it again. After this, you can launch the program and try to open the ZIP file again.
Use CMD in Windows 10 and 11. Some users recommend using the Command Prompt combined with the WinZip utility. If you use WinZip on Windows PC, this is a good solution for you. Press Win+S, enter CMD, and “run as administrator” to bring up CMD.
Change the directory to where the damaged file is situated. Type: “C:\Program Files\WinZip\wzzip” -yf zipfile.zip and press Enter to execute the repair command.
Use anti-virus software. ZIP files can be corrupted by malware or a virus. If you install and run anti-virus software it will locate any viruses or malware on your computer and remove them.
Use third-party ZIP repair software. WinRAR is recommended third-party software you can use for ZIP recovery. Download the software latest version of the software, find and highlight the damaged ZIP file. Now select the Tools menu and choose Repair Archive. Click Browse to select the directory you prefer to save the repaired ZIP archive file. This software isn’t free but you do get a free trial period of 40 days.
ZIP files allow you to store, email, download, and transfer large files. These files can suffer damage for various reasons that make them unable to access. Using Terminal provides a way to fix corrupted ZIP files on a Mac but there are also many third-party apps available for this purpose to make it easier. When using Windows, the best solution is often to use third-party software like WinRAR to fix ZIP files.