Question on How to Swap Characters

Started by lemonish, November 06, 2024, 09:57:17 AM

Previous topic - Next topic

lemonish

Hello everyone, forgive me as I'm not really good at this. Tried to search all over the net but couldn't find the solution.


I'm wondering how to get from this:-
Keywords:  "food,beach,ocean,sea,water,lunch,meal"

to this:
Keywords:   food; beach; ocean; sea; water; lunch; meal


Many many thanks in advance.

StarGeek

If all you want to do is change the exiftool output, then you would use the -sep option
C:\>exiftool -G1 -a -s -keywords y:\!temp\Test4.jpg
[IPTC]          Keywords                        : food, beach, ocean, sea, water, lunch, meal

C:\>exiftool -G1 -a -s -sep ; -keywords y:\!temp\Test4.jpg
[IPTC]          Keywords                        : food;beach;ocean;sea;water;lunch;meal

But this doesn't change the data in the file, nor should it. That is because keywords is a List type tag. The data isn't saved a simple string the contains all the entries like this
"food,beach,ocean,sea,water,lunch,meal"

Instead, List type tags are tags which are saved in the file as individual separate entries.  While many programs will display them as comma/semicolon separated, they are not.  Each entry is completely self-contained and separate from the others.

Using the XMP:Subject tag as an example, here's how the data is saved in the file
<dc:subject>
 <rdf:Bag>
  <rdf:li>keyword 1</rdf:li>
  <rdf:li>keyword 2</rdf:li>
  <rdf:li>keyword , with comma</rdf:li>
 </rdf:Bag>
</dc:subject>


See FAQ #17, List-type tags
"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