Phil and friends,
I while back I posted about modifying tags in a batch. I'm some ways along now, but I have a question of data stability:
How do I validate that my new copy is good before I delete the old?
In the exiftool manpage, the modification options correctly say "make sure that your operation is successful before deleting the original". However, in a large batch, it is not feasable to ask the user to hand-validate 100 files. Currently, my program does:
generate list of tags to apply > args-file
tmpname = `mktemp`
cp original.raw tmpname
exiftool -overwrite_original_in_place -tagsFromFile @ -@ args-file tmpname
if (all commands returned 0) mv -f tmpname original.raw
First, we only do work on the temporary copy, keeping the original.raw safe. I know that "all commands returned 0" is a decent guarantee that the result is good, but it isn't perfect. What I'd like to do is grab the actual RAW image data from "original.raw" and "tmpname" and compare. Strip all EXIF info, all previews, just the actual image data. Is there an easy way to do this that is valid for all raw file types?
Joel