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, perhaps affecting the hue of a single pixel in some obscure help screen buried where you'll never notice it. This means you can either ignore the errors (if only you can access the corrupted file), or you can try to repair them.

Solutions
Re-download the 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.

WinZip fudge This is my 'guaranteed-or-your-money-back' method that works for all ZIP files and WinZip self-extracting EXEs:
Because later versions of WinZip have changed, the first step is to download an older version and install it, choosing the classic interface rather than the 'wizard'. I can vouch for WinZip version 8.1. Other early versions will probably work too. If you have a later version of WinZip installed, you might need to temporarily uninstall it before installing the older version.
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 using the Open command and choosing Files of type: / Archives and exe files.
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 by dragging the bad file from within the WinZip window into an explorer window. Behind the scenes, WinZip will be forced to use its temporary folder as an intermediate step that assists our cause. So this time when WinZip halts and presents you with a 'bad CRC' error message (see pic), DON'T click the OK button immediately. With the message still active, open another explorer window and 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 later versions of Windows it is typically 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. It will have the same file name as that displayed in the WinZip interface. Make a copy of the file (use copy and paste commands or 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.
Extract any other non-corrupted files from within the downloaded archive and manually insert the one you have just salvaged. If other files depend upon it, make sure your copy's filename exactly matches that of the original. Also, 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.

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. I had no luck. This method is likely to have worked only if the original archive was saved with WinRAR's Protect archive from damage option. Chances are it won't work for you either, 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 and save settings. 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..

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

7-Zip data error7-Zip The excellent freeware program 7-Zip seems to be handy with broken RAR archives, but not so good for recovering ZIP files. If you have trouble with a corrupt RAR archive that WinRAR can't handle, try extracting it with 7-Zip. If you're lucky, it will gloss over the fault and spit out a result, despite complaints. However, 7-Zip does not seem to create accessible temp files while extracting files from faulty zip archives. Instead, it just produces a 'data error ... file is broken' message with no option of keeping the broken file. If you're stuck at this point using 7-Zip with a bad zip file, try either the WinZip or WinRAR methods above.

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. Aladdin Systems has a 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.

Go to site
Third-party repair Several shareware and freeware zip programs contain a repair function. These can be found on the web by searching on 'repair zip' etc. In addition to WinRar's repair option, I tried several others but they all likewise failed to fix my particular CRC error. I did have success with a program called Advanced Zip Repair, now DataNumen 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.

 

 

 

 


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