Page 1 of 1

Trying to locate corrupt JPG files in Very Large Directory

Posted: 2011-01-17T21:55:39-07:00
by Spinman
Hope someone will be able to point me in the right direction...

I have a windows directory with 17,000 jpg photos.
The application that accesses these photos is crashing when I try to load the directory - which tells me that there is at least one corrupt file in the directory.

Was thinking that I could use the dos window command line "identify *.*" to find my problem files - but the output shows the results for all files.

Is there anyway that I can filter the results to show only the corrupt files - or another way I can easily find my problem files?

In the past I was able to stumble upon several files that did not display a preview properly - but with 17,000 - it's too hard to stumble across a problem file...


Thanks so much...

Re: Trying to locate corrupt JPG files in Very Large Directo

Posted: 2011-01-18T09:34:19-07:00
by markmarques
An idea would be using the convert command line options and then format the output ...
Check : http://imagemagick.org/script/escape.php

something in the likes :

convert *.jpg -identify -format %[EXIF:tag]

If an image does not have the EXIF part it might be an GIF ....

Although I suppose the problem might be a PNG / GIF file mis-renamed as JPEG or JPG and the programs due give that kind of error ...

Re: Trying to locate corrupt JPG files in Very Large Directo

Posted: 2011-01-18T17:28:14-07:00
by Spinman
Just to close the loop - I ended up using a freeware program I found on the web called "Bad Peggy".

It ran thru my entire directory and identified 2 jpg's that were corrupt. Manual deletion - and all it well.