Search for files that do not contain keywords

Started by Joanna Carter, March 26, 2022, 04:42:59 AM

Previous topic - Next topic

Joanna Carter

Does anyone have the syntax for an -if that will list all files that do not have keywords?

Joanna Carter

I found it!!!

For those that have need...

exiftool -if 'not defined $keywords' -r -filename .

StarGeek

Depending upon the programs used, keywords might also be in Subject
exiftool -if 'not (defined $keywords or defined $subject)' -r -filename /path/to/files/

In most cases, simply -if 'not ($keywords or $subject)' should work.  Adding defined covers the edge cases where the only keyword is "0" or an empty string.
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).