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.

Possible Duplicate:
Automating the scanning of graphics files for corruption
Successful data recovery but most files are corrupted

I tried to recover data from a 'accidentally' formatted drive and the result was a lot of recovered files. However, many of them are corrupted including audio, image, document.... files. Is there any method or software to detect which files are corrupted by checking the file header without having to open every file? I'm using Windows 7.

share|improve this question
    
You mean just the file headers, or the actual data? –  soandos Aug 12 '12 at 8:09
    
I meant just the file headers. Is it possible? –  user433531 Aug 12 '12 at 8:14
    
What file formats do you care about? –  soandos Aug 12 '12 at 8:15
1  
@Nifle, he is asking to see if they are corrupted, not fix the corruption. –  soandos Aug 12 '12 at 8:24
1  
Take a look at this question: superuser.com/questions/276154/… –  soandos Aug 12 '12 at 8:31
show 1 more comment

marked as duplicate by Nifle, Mokubai, 8088, Renan, Diogo Aug 12 '12 at 20:43

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

2 Answers

up vote 2 down vote accepted

You could get some of the way by using this utility.
It's command line so you would have to wrap it in a bat-file of some sort.

http://gnuwin32.sourceforge.net/packages/file.htm

File for Windows

File: determine file type Version

File tests each argument in an attempt to classify it. There are three sets of tests, performed in this order: filesystem tests, magic number tests, and language tests. The first test that succeeds causes the file type to be printed. The type printed will usually contain one of the words text (the file contains only printing characters and a few common control characters and is probably safe to read on an ASCII terminal), executable (the file contains the result of compiling a program in a form understandable to some UNIX kernel or another), or data meaning anything else (data is usually `binary' or non-printable). Exceptions are well-known file formats (core files, tar archives) that are known to contain binary data.

share|improve this answer
    
I asked for checking if the file is corrupted and file type may vary such as image, audio, document...; not fixing the file or just graphic files. Now the question is closed as exact duplicate. Anyway, thank you for the hint. Now I gonna write some small codes to work with the utility. –  user433531 Aug 14 '12 at 2:55
add comment

You can use WinHex, FrHed, or like editors to quickly see the header value of the file to determine the type. Sorry, it is going to be painful to manually do. So long as you recover most important Documents, rest you can just ignore and re-install the system from a backup or freshly new install OS back.

http://en.wikipedia.org/wiki/Comparison_of_hex_editors

share|improve this answer
add comment

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