ExifTool Forum

ExifTool => The "exiftool" Application => Topic started by: hacksenwerk on February 07, 2022, 06:12:57 PM

Title: How to set the values of two different tags as the value for a third tag?
Post by: hacksenwerk on February 07, 2022, 06:12:57 PM
At its best with some delimiter like an underline.

Regards
Title: Re: How to set the values of two different tags as the value for a third tag?
Post by: StarGeek on February 07, 2022, 07:38:20 PM
With a space between
exiftool "-TAG3<$TAG1 $TAG2" /path/to/files/

If you want to use an underscore, then you have to add braces to the first tag, so exiftool doesn't think the underscore is part of the tag name.
exiftool "-TAG3<${TAG1}_$TAG2" /path/to/files/

If this command is run under Unix/Mac, swap the double quotes for single quotes to avoid bash interpretation.
Title: Re: How to set the values of two different tags as the value for a third tag?
Post by: hacksenwerk on February 10, 2022, 04:15:42 PM
Thank you very much StarGeek.

It is funny I was struggling arround with try and error till I got to this:
exiftool "-TAG3<$(TAG1)$(TAG2)" foobar
So close and so far away...
;)

Regards