ExifTool Forum

ExifTool => The "exiftool" Application => Topic started by: herb on December 06, 2017, 07:44:06 AM

Title: Tag with "empty string" value
Post by: herb on December 06, 2017, 07:44:06 AM
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
Title: Re: Tag with "empty string" value
Post by: Phil Harvey on December 06, 2017, 08:22:08 AM
Hi Herb,

to find an undefined TAG:

-if "not defined $TAG"

to find an empty TAG:

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

- Phil
Title: Re: Tag with "empty string" value
Post by: herb on December 06, 2017, 02:11:06 PM
Hello Phil,

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

Best regards
Herb