• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

how to detect file corruption

x_kzy_xd

Member
Sometimes, my files become corrupted without me noticing - this happens to my photos a lot. This doesn't bother me when I notice it because I have backups. It's growing to be a pain to manually go over all the photos from time to time. What can I do to automatically detect if a file has been corrupted?

So far, the only method I have found is to use MD5 checksums. But I haven't found a way to automate this.

For example, if I have a folder with 500 pictures, how I do determine if the MD5 checksums for the photos have changed since last time I checked?
 
I <3 ImageMagick.
Code:
for %i in (*.jpg) do @convert %i bmp:NUL
That will attempt to convert every JPEG into a simple bitmap, then discard that bitmap. If it finds problems it should alert you. Of course if you want that in a batch file, use "%%i" instead of "%i".
 
Last edited:
I'm lazy and put my WORM backups into archives for CRCs 🙂, but look for "sfv" (simple file verification) software. SFV Ninja seems to be somewhat popular.

I really wish someone would make a nice GUI for PAR2 that handles subdirectories, though: two birds with one stone and all that.
 
It might not be a bad idea for you to burn a MEMTEST86+ ISO and use it to test your memory modules, one at a time, through several passes. One of the side effects of a failing memory module is often file corruption problems or file system errors.

If you haven't done it, it also might be prudent to download a diagnostic from your hard drive manufacturer's website and test your hard drive for faults as well.
 
Could use something like fciv.

Generate checksums:
Code:
fciv.exe c:\users\x_kzy_xd\Pictures -r -type *.jpg -xml c:\users\x_kzy_xd\Documents\img_checksums.xml

Verify checksums:
Code:
fciv.exe -v -xml c:\users\x_kzy_xd\Documents\img_checksums.xml

But yeah, your images really shouldn't just corrupt for no reason all the time. I'd look into memory and/or hard disk problems, errant software, etc...
 
Last edited:
Wow seriously? Like Steltek said, run a memtest & HDD scan ASAP. My wife has probably has 100K+ photos from her photo shoots and has never had corruption problems on either Windows or Mac.

What are you system details? OS, boot drive, etc.
 
Back
Top