2

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, and 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.

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

2 Answers 2

2

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.

1
  • 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.
    – Teiv
    Aug 14, 2012 at 2:55
0

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

Not the answer you're looking for? Browse other questions tagged .