Add more than one keyword via csv file

Started by felixmaisel, May 27, 2023, 07:03:03 AM

Previous topic - Next topic

felixmaisel

Hello everyone,

My name is Fèlix, and a few weeks ago I installed Exiftool because I would like to import a series of keywords (XMP: Subject, to be precise) from a csv file.

It works fine when there is only one single keyword in the csv file, but once I try importing multiple keywords, it does not seem to work for me.

I have tried using the -sep "," option (mentioned here), but I must be doing something wrong because it does not work either...

The code I have been using to import the metadata is the following:

exiftool -overwrite_original -csv="C:\Users\felix\Desktop\MUMOVEP\Pruebas\PruebasManuales\00PruebasManuales_Actualizado.csv" "C:\Users\felix\Desktop\MUMOVEP\Pruebas\PruebasManuales"

You will find three .jpgs and the csv file attached down below.

Can someone help me out?

Thank you so much in advance,
Fèlix

sevy

Hello,
I perform a first test with the following command :
exiftool -sep ", " -csv=felix.csv -ext jpg .The content of the csv file was the following :
"SourceFile","Xmp:subject"
"./170102_ELPAIS.jpg","testa1, testa2"
"./170103_ELPAIS.jpg","testb1, testb2"
"./170104_ELPAIS.jpg","testc1, testc2"

and it was ok.
So I changed your csv file to
"SourceFile","XMP:Subject"
"./170102_ELPAIS.jpg","CIVIL, CONFLICTOSRACIALES"
"./170103_ELPAIS.jpg","POLITICO"
"./170104_ELPAIS.jpg","ESTAMENTAL"

and it was ok.

Take care about field delimiters.

ps : csv files were edited with LibreOfficeCalc

hope this help

sevy


felixmaisel

Thank you for the quick response, Sevy...

Unfortunately, I have tried using and it still does not work for me. I must be doing something wrong because, when I change the .csv file with what you sent me, I get the following message:

Invalid tag name '"SourceFile","XMP:Subject"' in CSV file
No SourceFile './170102_ELPAIS.jpg' in imported CSV database
(full path: 'c:/users/felix/desktop/mumovep/pruebas/pruebasmanuales/170102_elpais.jpg')
No SourceFile './170103_ELPAIS.jpg' in imported CSV database
(full path: 'c:/users/felix/desktop/mumovep/pruebas/pruebasmanuales/170103_elpais.jpg')
No SourceFile './170104_ELPAIS.jpg' in imported CSV database
(full path: 'c:/users/felix/desktop/mumovep/pruebas/pruebasmanuales/170104_elpais.jpg')
    1 directories scanned
    0 image files read

Do you know why this might be happening to me?

Phil Harvey

There is something wrong with your CSV file.  (Invisible characters or improper quoting?) Please attach it to a post so we can take a look.

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

felixmaisel

Hi Phil!

Sorry, I forgot to attach the CSV file again. Here you have :)


Thank you so much in advance,
Fèlix Maisel

Phil Harvey

The quoting was spectacularly incorrect.  Try the attached version.

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

felixmaisel

Oh, wow :-[

Thank you so, so much. It works perfectly fine now.

This will make my life so much easier. I truly appreciate your help!

Fèlix Maisel