How to concatenate tag with text?

Started by Michael Tapes, August 06, 2011, 07:05:08 PM

Previous topic - Next topic

CoSpi

Ok, so comma and space have to be used

thank you so much for your help

Microsoft Windows [Version 10.0.10240]
(c) 2015 Microsoft Corporation. Všechna práva vyhrazena.

D:\Programs\ExifTool>exiftool a.jpg -regionpersondisplayname -sep "=="
Region Person Display Name      : Krist├Żna Jirkova=Martin Hol├Ż


D:\Programs\ExifTool>exiftool a.jpg "-hierarchicalSubject<${regionpersondisplayname;s/(^|, )/$1MyTags\|People\|/g}" -sep ", "
    1 image files updated

D:\Programs\ExifTool>exiftool a.jpg -hierarchicalSubject
Hierarchical Subject            : MyTags|People|Krist├Żna Jirkova, MyTags|People|Martin Hol├Ż

Phil Harvey

Hmmm.

The problem isn't that the RegionPersonDisplayName is a simple string.

The problem is that one of the equals signs is getting eaten somehow.  That I don't understand.  Why is there only one "=" separating the names?  Try other separators to see if they work.  Could Windows be somehow changing the "==" command-line argument to "="?  What is the output of echo "=="?

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

CoSpi

I hope this will help you to find what is happening
D:\Programs\ExifTool>echo "=="
"=="

D:\Programs\ExifTool>exiftool a.jpg -regionpersondisplayname -sep "=="
Region Person Display Name      : Krist├Żna Jirkova=Martin Hol├Ż

D:\Programs\ExifTool>exiftool a.jpg -regionpersondisplayname -sep "==="
Region Person Display Name      : Krist├Żna Jirkova==Martin Hol├Ż

D:\Programs\ExifTool>exiftool a.jpg -regionpersondisplayname -sep "===="
Region Person Display Name      : Krist├Żna Jirkova===Martin Hol├Ż

D:\Programs\ExifTool>exiftool a.jpg -regionpersondisplayname -sep "!"
Region Person Display Name      : Krist├Żna Jirkova!Martin Hol├Ż

D:\Programs\ExifTool>exiftool a.jpg -regionpersondisplayname -sep "?"
Region Person Display Name      : Krist├Żna Jirkova?Martin Hol├Ż

D:\Programs\ExifTool>exiftool a.jpg -regionpersondisplayname -sep "|"
Region Person Display Name      : Krist├Żna Jirkova|Martin Hol├Ż

D:\Programs\ExifTool>exiftool a.jpg -regionpersondisplayname -sep "/"
Region Person Display Name      : Krist├Żna Jirkova/Martin Hol├Ż

D:\Programs\ExifTool>exiftool a.jpg -regionpersondisplayname -sep "\"
Region Person Display Name      : Krist├Żna Jirkova"Martin Hol├Ż

D:\Programs\ExifTool>exiftool a.jpg -regionpersondisplayname -sep "\\"
Region Person Display Name      : Krist├Żna Jirkova\Martin Hol├Ż

Phil Harvey

Somehow Windows must be eating one of the = symbols.  Bad luck on my part to choose this symbol I guess.

The echo command didn't help, because somehow it seems to be bypassing normal argument parsing (since the quotes show up in the output).

I did some googling, and the equals sign is a delimiter for Windows .BAT file arguments.  Somehow this seems to be affecting us here.  But this doesn't make sense because lots of other ExifTool arguments with equals signs work fine.  (ie. -artist=phil)

I'll see if I can remember to play around with this the next time I am on a Windows machine.

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