I don't know how to insert various values into a same xmp bag

Started by Moisés López García, January 10, 2017, 01:50:18 PM

Previous topic - Next topic

Moisés López García

Hello everybody.
I have to insert a lot of bibliographic metadata into tiff files.
I am using the command line exiftool with:

exiftool.EXE -config dcterms.cfg -charset utf8 -csv=metadatos.csv *.tif

(I have removed paths here to clarify the call)
dcterms.cfg contains a partial dcterms structures that I need to insert. The csv file is generated by my program from the database.

All works fine except that I don't know how to insert various values into the same field (bag) . For example, part of my dublin core xml says:

<dc:subject>AdditionalAuthorInfo</dc:subject>
<dc:subject>Subjects</dc:subject>
<dc:subject>FormatOfPhoto</dc:subject>


If I create a csv like:

SourceFile ,Subject,Subject,Subject
0001.tif,AdditionalAuthorInfo,Subjects,FormatOfPhoto

exiftool only writes the third value.
So, there is any way of doing this using csv files?
I have not found anything around the web and I have already try some things like "Subject1, Subject2, Subject3"
If there's not posible to use csv in this case, I 'll appreciate any suggestion.

Thank you very much.
Moisés.

Phil Harvey

Hi Moisés,

Your CSV should be something like this:

SourceFile,Subject
0001.tif,"AdditionalAuthorInfo, Subjects, FormatOfPhoto"


Then the command would be:

exiftool -config dcterms.cfg -charset utf8 -csv=metadatos.csv -sep ", " -ext tif .

(or use some other separator if any of your Subject items contain a comma)

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

Moisés López García

Thank You very much for your quick response, Phil.
It have worked perfectly.

I want to take this opportunity to thank you for making this great program. I have been working for a while in digital preservation and Exiftool is the best program I have found in this field.

Regards.
Moises.