I want to change -Exif:LensModel="50mm F1.4" into -Exif:LensModel="Sigma AF 50mm F1.4 EX DG HSM", but the jpgs with this value are spread into different folders and mixed with jpegs shot with other lenses.
Is there a way to launch exiftool in a way that changes the value in some folders and subfolders only if it corresponds to "50mm F1.4", leaving all other jpgs untouched?
Thanks in advance.
Yes.
exiftool -if "-exif:lensmodel eq '50mm F1.4'" -exif:lensmodel="Sigma AF 50mm F1.4 EX DG HSM" -r DIR
(where DIR is the name of the root directory containing your images)
Note that this will preserve the original images by adding "_original" to the extension of the file. Afterwards, if you realize you did something wrong, you can restore the originals:
exiftool -restore_original -r DIR
or delete the originals if you don't want them:
exiftool -delete_original -r DIR
- Phil