Copying IPTC Supplemental Categories to Keywords

Started by Toms, January 18, 2023, 09:35:30 AM

Previous topic - Next topic

Toms

Hi!

How do I copy everything from IPTC field "SupplementalCategories", and append it to the IPTC "Keywords" field?

For example, i have Supplemental Categories:
  category_1
  category_2
and Keywords:
  keyword_1
  keyword_2
  keyword_3
and I'd like the new Keywords look like this (order is not important):
  keyword_1
  keyword_2
  keyword_3
  category_1
  category_2

I've tried this:
exiftool "-iptc:Keywords+<iptc:SupplementalCategories" C:\temp
but after this the first keywords are replaced with categories:
  category_1
  category_2
  keyword_3

Thank you in advance!

Phil Harvey

> exiftool a.jpg -iptc:supplementalcategories -iptc:keywords
Supplemental Categories         : category_1, category_2
Keywords                        : keyword_1, keyword_2, keyword_3
> exiftool a.jpg "-iptc:Keywords+<iptc:SupplementalCategories"
    1 image files updated
> exiftool a.jpg -iptc:supplementalcategories -iptc:keywords
Supplemental Categories         : category_1, category_2
Keywords                        : keyword_1, keyword_2, keyword_3, category_1, category_2

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

Toms

Indeed... I tested keywords with an old app ThumbsPlus, which for some reason was not able to display all the keywords. Probably, it is just too old  :-\
Thank you!

StarGeek

You might check to make sure that the keywords have been separated properly.  The above command will copy them correctly, but something else might not have.

Add the -sep option to see where the keywords are actually separated.

For example, with -sep ## you would get this
C:\>exiftool -G1 -a -s -sep ## -keywords y:\!temp\Test4.jpg
[IPTC]          Keywords                        : keyword_1##keyword_2##keyword_3##category_1##category_2

If instead you get this
C:\>exiftool -G1 -a -s -sep ## -keywords y:\!temp\Test4.jpg
[IPTC]          Keywords                        : keyword_1, keyword_2, keyword_3, category_1, category_2
then they aren't separated properly.  See FAQ #17 for command to fix in this case.

Also, if the individual keywords are long, over 64 characters, then you're running into the IPTC character limit.  The -m (-ignoreMinorErrors) option is needed to write keywords longer than that.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype