Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

There was a utility a long time ago called CFAtest that was doing this quite nicely, but it has disappeared.

Basically, I am looking for a similar tool (preferably graphical) that will traverse a given path (preferably including subfolders) and test all zip files that it finds.

Decent logging options would be a plus.

share|improve this question
2  
Which operating system? –  Matteo Dec 31 '12 at 10:23

5 Answers 5

This will find in all subfolders the files (-type f) with the extension zip (or ZIP or Zip or zIp and so on, case is ignored, -iname) and test their integrity (unzip -t).

find -type f -iname '*.zip' -exec unzip -t {} \;
share|improve this answer
    
And if you are on Windows and don't have find, install Cygwin. –  Daniel R Hicks Jan 23 '13 at 12:23
2  
... or use the for command. –  Karan Jul 15 '13 at 6:17
    
... or download gnuwin32.sourceforge.net –  Franck Dernoncourt Mar 8 at 18:36

On Windows I use 7zip: it provides a graphical user interface, is free and supports a wide range of archive file formats including zip.

Navigate to the given folder you want to analyze on Windows Explorer. Search for *.zip, select all files, right-click, select "Test Archive"

enter image description here

Then wait (note that it takes around 10 minutes for explorer.exe to go through 100,000 .zip before 7z start testing):

enter image description here

share|improve this answer

It might not be quite what you asked for but there is a tool named Zip2Fix.

I haven't used it but you can download it from here:

http://leelusoft.blogspot.com/2011/06/zip2fix-10.html

share|improve this answer

Quick PowerShell command - using 7zip's commandline "t" switch

$7z = "T:\folder\to\7z.exe"
Dir "C:\folder\to\check" -r -include @("*.zip","*.7z") | % { & $7z t $_ -r}

Output

7-Zip 9.20  Copyright (c) 1999-2010 Igor Pavlov  2010-11-18

Processing archive: D:\testfile.zip

Testing     my test file.txt
Testing     second file.doc

Everything is Ok

Folders: 0
Files: 2
Size:       10353
Compressed: 5721
share|improve this answer

erik's answer didn't work for me on a Mac but this works for zips in current folder and all subfolders:

find . -name '*.zip' -exec unzip -tq {} \;

Outputs this for each file:

No errors detected in compressed data of ./2013-10-16.zip.
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.