Find empty tag not working

Started by Birdman, March 16, 2023, 01:04:50 PM

Previous topic - Next topic

Birdman

Hello,

I am using the following IF command for Windows to search for an empty tag in order to only fill in those files:
exiftool -if "$artist eq '' and $FilmMode eq 'F0/Standard (Provia)'" "-artist=My Name | Provia" -overwrite_original *.RAFUnfortunately the $artist eq '' is ignored and all files with the correct FilmMode are changed, not just those with the empty artist.
Best regards,

Martin (Birdman)

Phil Harvey

Hi Martin,

Try this:

exiftool -if "not $artist and $FilmMode eq 'F0/Standard (Provia)'" "-artist=My Name | Provia" -overwrite_original *.RAF

This work for files where Artist is either missing, or set to "" (null string), or set to "0" (zero).

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Birdman

No, same behaviour. It chnages all files instead of only the empty ones.
Best regards,

Martin (Birdman)

Birdman

Quote from: Phil Harvey on March 16, 2023, 01:06:21 PMHi Martin,

Try this:

exiftool -if "not $artist and $FilmMode eq 'F0/Standard (Provia)'" "-artist=My Name | Provia" -overwrite_original *.RAF
Now it worked. I hate Fujifilm raw-files, they behave totally odd. When writing something with the normal command into the tag "artist" the information is stored in the tag IFD0:artist instead, the tag artist as will be shown in exiftool stays empty. The command not $IFD0:artist now worked. Thanks!
Best regards,

Martin (Birdman)