copy keywords from csv to IPTC of an image

Started by ionut, December 06, 2016, 10:12:42 AM

Previous topic - Next topic

ionut

Hi,

I have a problem when using the exiftool.

I want to copy the keywords from a csv file (keywords.csv) to all the images in a folder. Each image has its own keywords.

I'm using this command: exiftool -csv=keywords.csv - ext jpg c:\images
But it's copying only the first few keywords: "keyword 01, keyword 02, keyword 03, keyword 04, keyword 05, keyw"
Obviously, I have 30 or 40 keywords.

Can you please advise. What am I doing wrong?

Teo_

May be you need to use the "-sep" option?
So:
exiftool -csv=keywords.csv -sep "," -ext jpg c:\images

StarGeek

Yep, Teo_ is correct.  Your keywords in the csv file is being added as a single long keyword.  Keywords is part of the IPTC group and is limited in length (unless you add the -m option), which is why it gets truncated.

Add -sep "," (if keywords are separated by only a comma) or -sep ", " (if separated by CommaSpace), to your command and it should work correctly.
"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

Phil Harvey

Quote from: StarGeek on December 06, 2016, 05:28:02 PM
Add -sep "," (if keywords are separated by only a comma) or -sep ", " (if separated by CommaSpace), to your command and it should work correctly.

Actually, -sep ", " (with a space) works for both because a space in the -sep argument matches zero or more spaces in the string.

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