Is there a way to write to CSV with the condition of empty fields, in my case keywords? I tested this on a folder, and had no results with exiftool -if '$keywords=//' -filename -r -csv "C:\test" > "C:\test.csv"
. I wasn't sure what you put between the //'s.
Thanks.
Testing for an empty keyword is a bit tricky, but this should do it:
-if "$keywords=~/(^|, )(, |$)/"
This expression looks for ", , " anywhere in the Keywords string, or ", " at the start or end, or an empty string.
Note that you must use double quotes in Windows.
- Phil
Excellent. That worked. Thanks a lot.