Page 1 of 1

EXIF Tools and spaces

Posted: Fri Oct 11, 2019 3:28 pm
by Terkelsen
I have a Switch flow with a Submit Point. I want to upload images and type the name of the photographer in a metadata field in the Submit Point. The image then go to an Execute Command element, where EXIFTool is used to put the name into the IPTC tag called "creator".

If I type a photographer name with a space like "Peter Brown", Execute Command will fail if "Fail if exit code" is set to "Nonzero". If it is set to "Disregard exit code" it will work, but only the part of the name before the space (Peter) is written into the tag.

I'm using this argument in Execute Command:
-Creator=[Metadata.Text:Path="/field-list/field[1]/value",Dataset="Submit",Model="XML"] "%1"

Does anybody know, if there is a way to put the information in brackets or anything, to get the full name into the tag?

Re: EXIF Tools and spaces

Posted: Sun Oct 13, 2019 8:01 am
by Padawan
Can you try with putting single quotes around your switch variable?

By using quotes you tell the command the two parts of the name belong together. In this place I would use single quotes to not interfere with the double quotes used in the switch variable.

Re: EXIF Tools and spaces

Posted: Sun Oct 13, 2019 10:14 pm
by Terkelsen
I'm not quite sure exactly where to place the single quotes, but I tried a lot of different possibilities and it returns either nothing at all or the first name with a single quote in front ('Peter).

Re: EXIF Tools and spaces

Posted: Mon Oct 14, 2019 7:30 am
by LasseThid
I googled EXIFTool and found a page with Command-Line Examples and it shows this: exiftool -artist="Phil Harvey"

Have you tried the double quotes?

Also -Creator=[Metadata.Text:Path="//field[tag='Name of the metadata field']/value",Dataset="Submit",Model="XML"] "%1" makes it easier to understand what metadata is being used and also means that if you change the order of the metadata fields in the submit point you will still get the correct metadata. 8-)

So instead of /field-list/field[2]/field-list/field[1]/field-list|field/field-list/field/value you would write //field[tag='Gramvikt'] to get the value 250 gsm in the screenshot below.

Skärmavbild 2019-10-14 kl. 07.43.01.png
Skärmavbild 2019-10-14 kl. 07.43.01.png (107.76 KiB) Viewed 12616 times

Re: EXIF Tools and spaces

Posted: Mon Oct 14, 2019 9:04 am
by Terkelsen
Hi Lasse,

Double quotes are not accepted and this -Creator=[Metadata.Text:Path="//field[tag='Fotograf']/value",Dataset="Submit",Model="XML"] "%1" still returns only the first name :?

Re: EXIF Tools and spaces

Posted: Mon Oct 14, 2019 9:15 am
by jan_suhr
Try to put the whole Command in quotes. This has worked for me.
"-XMP-iptcExt:PersonInImage=[Metadata.Text:Path="/job/personer",Dataset="From Web",Model="XML"]" "%1"

Re: EXIF Tools and spaces

Posted: Mon Oct 14, 2019 10:37 am
by Padawan
Jan beat me to it. His solution also works with the Creator argument:
"-Creator=[Metadata.Text:Path="/field-list/field[tag='Fotograf']/value",Dataset="Submit",Model="XML"]" "%1"

Re: EXIF Tools and spaces

Posted: Mon Oct 14, 2019 11:00 am
by Terkelsen
I kind of expected the solution to come from you, Jan :) Thanks a lot. Actually the problem was not only spaces but also special characters like the Danish æ, ø and å, but this solutions solves it all. It works perfect!

Re: EXIF Tools and spaces

Posted: Mon Oct 14, 2019 11:19 am
by Terkelsen
And thank you, Lasse, for the tip about using the tag rather than the filed-list. That makes it a lot easier when rearranging the metadata fields in the Submit point :)