Author Topic: Question about syntax  (Read 1209 times)

ssmith001

  • Jr. Member
  • **
  • Posts: 19
Question about syntax
« on: October 16, 2013, 01:33:31 PM »
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

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 16885
    • ExifTool Home Page
Re: Question about syntax
« Reply #1 on: October 16, 2013, 02:24:58 PM »
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, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

ssmith001

  • Jr. Member
  • **
  • Posts: 19
Re: Question about syntax
« Reply #2 on: October 16, 2013, 03:26:03 PM »
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

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 16885
    • ExifTool Home Page
Re: Question about syntax
« Reply #3 on: October 16, 2013, 06:33:11 PM »
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, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).