I have a large amount of files, some with errors from a bad disk or transfer, mixed in with the same files without errors, an example of which I've included. Is there an exiftool command to find these kinds of file errors? I couldn't get -efile to work, so help with that would be appreciate too. Thanks.
(https://i.imgur.com/l8nO2jl.jpg)
You included a JPG file but you say the problem is with NEF files.
Try running this command on one of the bad NEF files to see what ExifTool says:
exiftool -validate -warning -a FILE
About -efile -- what command did you use?
- Phil
Thanks. I included the just jpg as an example, here is a link to the actual file: NEF with error (https://drive.google.com/file/d/1hvoRd__RFDpeC9ouBi16AbQl8kOrW9P4/view)
I get the same output for both files with and without errors for the code you suggested:
Wrong IFD for 0x9003 DateTimeOriginal (should be ExifIFD not IFD0)
Here is the -efile I attempted. Let me restate that it's not that it didn't work, it gave me the readout of all the file attributes but I can't see an error, and it would be much easier as a CSV output:
exiftool -efile1 "C:\Test\Errors.csv" "C:\Test\Errors"
Right. The command you gave would produce no output to the -efile1 file for the sample NEF file because it didn't generate any errors.
The image corruption issue is subtle and doesn't affect the rest of the file, so it doesn't cause an error with ExifTool.
Unfortunately there isn't a way to detect the raw data problem in your sample file using ExifTool.
- Phil
Thanks. I realized I could also extract the thumbnail and use an image comparison program I have, in case there's no solution from a direct exiftool command.
However, when using %f in Windows to extract the thumbnail and have the same filename, I end up with a filename of "f.tiff" for the thumbnail. Looking up in the documentation, it says to use %%f. I then get a file "%f.tiff".
exiftool -b -ThumbnailTIFF "C:\Errors\(filename).nef" "C:\Thumbnails\%%f.TIFF"
The command you posted is incomplete. You need a -w before the output file format string:
exiftool -b -ThumbnailTIFF "C:\Errors\(filename).nef" -w "C:\Thumbnails\%f.TIFF"
(or %%f if you are running this from a .bat file)
- Phil
Excellent, thanks so much.