OS: Windows 10
If you got a folder containing 3 jpg files and want to get those that don't have an ISO tag you might use:
exiftool_12.59.exe -if "not defined $ISO" -m *.jpg
Output will be:
======== no_iso.jpg
ExifTool Version Number : 12.59
File Name : no_iso.jpg
Directory : .
...
Image Size : 4500x2532
Megapixels : 11.4
2 files failed condition
1 image files read
If you use the same command with 12.60 (or 12.61):
exiftool_12.60.exe -if "not defined $ISO" -m *.jpg
Output will be:
3 files failed condition
0 image files read
If you omit "-m" it will work as expected:
exiftool_12.60.exe -if "not defined $ISO" *.jpg
Output will be:
======== no_iso.jpg
ExifTool Version Number : 12.60
File Name : no_iso.jpg
Directory : .
...
Image Size : 4500x2532
Megapixels : 11.4
2 files failed condition
1 image files read
I usually use that if clause in combination with "-tagsfromfile" within a batch file. Omitting "-m" is not an option in that case.
The behaviour of 12.59 was contrary to the documentation. This was fixed in 12.60:
Apr. 5, 2023 - Version 12.60 (production release)
- Fixed handling of undefined tags in -if conditions to conform with
documentation and match -p and -tagsFromFile behaviour when -m or -f option
is used
Undefined tags are set to an empty string when the -m option is used.
I would suggest changing the condition to -if "not $iso" to handle both cases (with and without -m).
- Phil
Thank you very much for the explanation and the easy solution.