News:

2023-03-15 Major improvements to the new Geolocation feature

Main Menu

Question about syntax

Started by ssmith001, October 16, 2013, 01:33:31 PM

Previous topic - Next topic

ssmith001

In reference to the attached screen shot, I am trying to combine the values from XMP-wxnv:Keywords field into the IPTC:Keywords field, so I would end up with something that looks like this in the IPTC:Keywords field:  Imperial, miracle bubbles, 5 in 1 bubble fun 07666607452, 4013085

I had been using this command to write the filename's first 11 characters to the Subject field, so I think the syntax is something like this but I don't know how to contatenate the two values together into a single field.

exiftool '-xmp:subject+<${filename;$_=substr($_,0,11)}' -overwrite_original "$f"

Phil Harvey

IPTC:Keywords is a list-type tag.  Read FAQ 17 for some help with this.  Basically, you do this:

"-iptc:keywords+<xmp-wxnv:keywords"

This copies the list items separately, and will work as long as xmp-wxnv:keywords is a list-type tag.  Otherwise you may have to use -sep ", " to split it into individual keywords when copying.

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

ssmith001

Thanks for your help Phil. I tried this command and the metadata is not getting updated as expected. The image remains unchanged.

exiftool '-iptc:keywords+<xmp-wxnv:keywords' -overwrite_original 07666607452_4013085.tif


Warning: No writable tags set from 07666607452_4013085.tif
    0 image files updated
    1 image files unchanged

Phil Harvey

This will happen if xmp-wxnv:keywords doesn't exist.

What is the output of this command?:

exiftool -xmp-wxnv:keywords 07666607452_4013085.tif

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