Craig's Scrapbook - Home

 
health
  technical
  motorcycles
  cars
 
 
 

 

 

CRC error in zip or self-extracting archive

Problem
I downloaded a big ZIP self-extracting archive (SFX EXE), but when I tried to extract it I got a CRC (cyclic redundancy check) error on one of the files it contained, and I could not access this file at all.

Cause
Glitches that occur while downloading or copying files can damage them. Computer gremlins, cosmic rays, Mercury in retrograde... who needs a reason? Stuff happens to perfectly good files sitting on hard drives or optical disks minding their own business, let alone those ricocheting through cyberspace. Thankfully, most of these tiny mutations aren't critical, meaning you can either ignore them (if only you can access the corrupted file), or you can try to repair them.

Solutions
1. Re-download the whole archive If your ZIP or EXE archive arrived via the internet, is still available, and you have the bandwidth and patience, re-download it. If you're lucky it might come through without errors the second time. But the bigger the file and the less reputable its source, the more likely it will contain another error—or the same error again.

2. Re-download only the bad file If you know the URL (address) of the file you can employ BigSpeed Zipper (freeware) to open the contents of a ZIP file on the remote server. You can then re-download only the file you need (instead of the whole compressed archive). This isn't much help if the corrupted file is one that accounts for most of the total file size on its own, and is of no use if the archive is in a format other than ZIP. In any case, you'll be hoping that the re-downloaded file arrives intact this time around. If not, try one of the steps below.

3. Simple repair Several shareware and freeware zip programs contain a repair function. These can be found on the web by searching on "repair zip" etc. I tried WinRAR and several others but they all failed to fix my particular CRC error.

Go to site
4. Advanced repair The only program that seemed to successfully repair my downloaded file was Advanced Zip Repair. The demo version only works on small files, but will tell you whether or not it will theoretically repair a bigger file if you were to fork out the cash for the paid version. This program seems pretty clever. However, the methods below also worked for me and cost nothing.

5. WinZip fudge The following method works for all ZIP files and WinZip self-extracting EXEs.
The idea is to play a trick on WinZip to get hold of the corrupted file through the back door before WinZip kills it off.
If you have a straight ZIP file, open it through WinZip. If your archive is a self-extracting WinZip EXE file, open it via the WinZip interface by either right-clicking the EXE file and choosing Open with WinZip, or by double-clicking and choosing the Run WinZip button.
If the archive contains multiple files, determine which one is corrupted by either extracting them individually until you find the bad one, or by extracting them all and viewing the error log when you are invited to do so.

Wait!Now that you know which file is bad, attempt to extract this file again into any folder. This time when WinZip halts and presents you with a "bad CRC" error message, DON'T click the OK button immediately. Go to the folder that WinZip uses as a temporary unzipping folder. The location of this folder will depend upon your version of Windows. In older versions, it was typically C:\Temp, but in Windows 7 it is C:\Users\Your Name\AppData\Local\Temp. If unsure, open WinZip and look in Options / Configuration / Folders.
Once you've opened WinZip's temp folder, you should see the bad file being held in limbo by WinZip. Make a copy of the file by using your right mouse button to right-drag the file to a blank space within the same folder or another destination folder, release the button, and choose Copy Here. Then go back to the WinZip error message and click that OK button. WinZip will take this as its cue to delete the corrupt file from its temp directory, but you will now possess a copy that is safe from WinZip's censorship. Make sure your copy's filename exactly matches that of the original.
Extract any other non-corrupted files from within the downloaded archive and manually insert the one you have just salvaged. Pay attention to any information that might be listed under the Path heading in WinZip's main window as your salvaged file (and all the others) will need to be in their correct subfolder(s), if any. This done, you can proceed as usual with your downloaded goodies. In all likelihood the error won't amount to anything significant.

6. WinRAR The following method is similar to the above and works for all ZIP files, RAR files, and WinRAR self-extracting EXE archives.
Open the file via the WinRAR program interface. This means either starting WinRAR first and using File-Open, or right-clicking an EXE and choosing Open with WinRAR.
If your archive contains multiple files, determine which file is corrupt by extracting all files into any folder and examining the diagnostic message that will appear when the bad file is encountered. Cancel the extraction.
Before using the method below, give WinRAR a chance to repair the file by highlighting it and choosing Repair Archive under the Commands menu. Try the resultant "_reconst.rar" file to see if it has really been repaired. This is likely to have worked only if the original archive was saved with the Protect archive from damage option. Chances are it won't work for you, so proceed thus:Keep broken files

Open the ZIP, RAR, or EXE file in the main WinRAR interface again. Now click the Extract To icon button. Under the Miscellaneous section you should see an option called Keep broken files. Check this box. Navigate to the folder into which you will extract your files, click OK to begin extracting the files, and then click Close when you are presented with a diagnostic message reporting the bad CRC. This time WinRAR will not have deleted your corrupted file, and you can proceed as usual—probably without any noticeable trouble. (Thanks to Derek for putting me on the right track with WinRAR).

WinRAR can be choosy about its own files. Sometimes obtaining the latest version of the program is the answer.

7. 7-Zip If you have trouble with a corrupt RAR archive that none of the above will solve, try extracting it with (the wonderful freeware program) 7-Zip instead of WinRAR. I've read of people for whom this did the trick.

7. Stuffit EXEs If you have a corrupt Stuffit EXE, the windows equivalent of a Macintosh SEA file, you're out of luck. I can't seem to find any way of repairing or recovering one of these compact little wonders. At present Aladdin Systems has a new compression standard called Stuffit X that incorporates built-in error recovery, but it only works for files saved in the new .sitx format. If anyone can figure out a recovery method for corrupt Stuffit EXEs, please let me know.

 


Copyright © Craig Forsythe, 2009. All rights reserved. Contact.