ExifTool Forum

General => Metadata => Topic started by: Birdman on March 16, 2023, 01:04:50 PM

Title: Find empty tag not working
Post by: Birdman on March 16, 2023, 01:04:50 PM
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.
Title: Re: Find empty tag not working
Post by: Phil Harvey on March 16, 2023, 01:06:21 PM
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
Title: Re: Find empty tag not working
Post by: Birdman on March 16, 2023, 01:11:20 PM
No, same behaviour. It chnages all files instead of only the empty ones.
Title: Re: Find empty tag not working
Post by: Birdman on March 16, 2023, 03:01:38 PM
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!