ExifTool Forum

ExifTool => Newbies => Topic started by: ionut on December 06, 2016, 10:12:42 AM

Title: copy keywords from csv to IPTC of an image
Post by: ionut on December 06, 2016, 10:12:42 AM
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?
Title: Re: copy keywords from csv to IPTC of an image
Post by: Teo_ on December 06, 2016, 10:48:08 AM
May be you need to use the "-sep" option?
So:
exiftool -csv=keywords.csv -sep "," -ext jpg c:\images
Title: Re: copy keywords from csv to IPTC of an image
Post by: StarGeek on December 06, 2016, 05:28:02 PM
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.
Title: Re: copy keywords from csv to IPTC of an image
Post by: Phil Harvey on December 07, 2016, 07:10:37 AM
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