Situation:
Summary the end of an ExifTool run:
406 directories scanned
2530 image files updated
2 files weren't updated due to errors
What is the best way to identify which files gave the errors, and what those errors were?
...Preferably without generating a -w file for each image file.
The stderr output should contain an "Error:" line for each file that gave errors.
- Phil
Thanks Phil,
I should have said: I'm running ExifTool through ExifMixer - so I don't think I get an option to trap stderr :(
Maybe I can run another pass through the same directory tree, checking for a value I was trying to insert (which would have failed and hence be null) - and deduce the affected files that way.
How do I check if a tag exists (or is null)?
//Mike
Quote from: MikeHardman on March 22, 2014, 12:01:53 PM
Maybe I can run another pass through the same directory tree, checking for a value I was trying to insert (which would have failed and hence be null) - and deduce the affected files that way.
How do I check if a tag exists (or is null)?
To check if a tag exists, you can use this command:
ExifTool -r -if "not defined $TAG" -filename <FILE/DIR>So if your tag is Caption-Abstract for example, replace "TAG" with Caption-Abstract. Since you mentioned a directory tree, I added
-r so it would recurse through the entire tree.
To check for your exact tag, you could use this command:
ExifTool -r -if "$TAG eq 'VALUE' " -filename <FILE/DIR>where you would replace "VALUE" with the data you were inserting. Though this won't work if you were adding a list type tag such as Keywords or Subject, unless it was the only item there. In that case you could use this command:
ExifTool -r -if "$TAG=~/VALUE/" -filename <FILE/DIR>But you first might want to try this command:
ExifTool -r -if "$warning" -warning <FILE/DIR>This can pick up on a few errors your files.
Star Geek,
Thanks v. much.
I shall have a play with those, and have noted the logic syntax for future ref.
Update: the problems were due to the two files being readonly (gawd knows why).