Tag with "empty string" value

Started by herb, December 06, 2017, 07:44:06 AM

Previous topic - Next topic

herb

Hello Phil,

thanks for the new version 10.68 of Exiftool and thanks for the new features: e.g. to create a tag with "empty string" value.

Now I have the question:
Is it possible to differ between a non existing tag and an existing tag with "empty string" value in an e.g. -IF condition?

Doing some tests I did not find a solution.
Thanks for your comments in advance

Best regards
Herb

Phil Harvey

Hi Herb,

to find an undefined TAG:

-if "not defined $TAG"

to find an empty TAG:

-if "defined $TAG and not length $TAG"

- 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 ($).

herb

Hello Phil,

thanks for your help.
Again I see that I should improve my Perl knowledge.

Best regards
Herb