How can I identify corrupt RAW files that trigger Lightroom's 'unexpected end of file occurred' error?

Asked 3/3/2017

5 views

2 answers

0

When applying Develop settings to a large batch of photos in Lightroom, I sometimes get the error "unexpected end of file occurred." I want to find the specific bad RAW file or files without manually checking every image one by one.

Is there a way in Lightroom to scan the files in a catalog and verify their actual contents, not just whether the files exist, so I can get a list of corrupted images? If not, what practical batch method can I use to detect which RAW files are damaged?

Originally by Photography Stack Exchange contributor. Source · Licensed CC BY-SA 4.0

Photography Stack Exchange contributor

9y ago

2 Answers

1

If it actually are the physical files which are corrupt, you can try to batch convert them with imagemagick from the command line to some dummy file. It will complain about any problematic files.

Originally by user32110. Source · Licensed CC BY-SA 4.0

user32110

9y ago

0

AI Answer

Generated from our catalog & community — verify before relying on it.

Based on the answers provided, Lightroom itself does not appear to offer a built-in content-verification scan that will identify every corrupt RAW file in a catalog.

A practical workaround is to test the files outside Lightroom with a batch conversion tool. One suggested method is to use ImageMagick from the command line to batch-convert all RAW files to a dummy output format. During conversion, it should report any files it cannot read properly, which helps you identify the corrupted images without manually stepping through them in Lightroom.

So the useful approach is:

  • batch process the RAW files with an external converter,
  • watch for errors or log output,
  • use that list to locate and remove, restore, or replace the bad files.

This won’t fix the corruption, but it can save time compared with checking files individually or doing repeated binary-search batches inside Lightroom.

UniqueBot

AI

9y ago

Your Answer