I have a bash script that is going through images and adding OR appending a comment. The command I am using is:
exiftool -comment="$fileNameOriginal" '-comment<$Comment '"$fileNameOriginal" -overwrite_original "$newFileName"
This is the output:
Warning: [minor] Tag 'Comment' not defined - Photo 001.jpg
Warning: No writable tags set from Photo 001.jpg
1 image files updated
However, when I check, the comment is there.
$ exiftool -comment "$newFileName"
Comment : IMG 0001.jpg
I don't get the error if I run the command a second time.
$ exiftool -comment="$fileNameOriginal" '-comment<$Comment '"$fileNameOriginal" -overwrite_original "$newFileName"
1 image files updated
$ exiftool -comment "$newFileName"
Comment : IMG 0001.jpg IMG 0001.jpg
Any way to ignore that first error saying comment is not defined?
And what does that second error mean? Why would I get it if the comment was written?
You can ignore the minor warning with -m.
The other warning can only be ignored with -q -q, but that will also remove the informational messages. It means that you were trying to copy tags from a file (the source file), but nothing was copied. This will happen if comment doesn't already exist.
- Phil
Got it. Thank you!