Author Topic: Writing Keywords to CSV - Not Working  (Read 3101 times)

Oskar

  • Jr. Member
  • **
  • Posts: 26
Writing Keywords to CSV - Not Working
« on: April 09, 2014, 03:26:38 PM »
Dear Sir,

I am using the following command to read data from Quicktime .mov files and write it to a CSV text file:

exiftool -csv -r -filename -description -keywords c:\Temp\Movs > c:\Temp\output.txt

The output file contains the source file name, the filename and description, but the keywords are totally missing, there is no column at all for keywords and there are no keywords at all. I tried to spell keywords option with capital K(Keywords), I tried the version -IPTC:keywords but no results at all.

Could you please help me? Many thanks!


P.S: I am on a Win7/64 bit machine.

Oskar

  • Jr. Member
  • **
  • Posts: 26
Re: Writing Keywords to CSV - Not Working
« Reply #1 on: April 09, 2014, 04:24:28 PM »
I found it! It is SUBJECT instead of keywords. Now the problem is that when opening the csv file the keywords are each in one cell instead of being all in a single cell, although the keyowrds separator is ";" and the preview(prior to opening the CSV file) looks fine(all keywords are in a single cell). 

Oskar

  • Jr. Member
  • **
  • Posts: 26
Re: Writing Keywords to CSV - Not Working
« Reply #2 on: April 09, 2014, 04:39:06 PM »
Finally sort it out. Here is the right command:

exiftool -csv -r -filename -description -subject -sep ";" FOLDER > output.txt


Thank you for the great tool!

Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 16687
    • ExifTool Home Page
Re: Writing Keywords to CSV - Not Working
« Reply #3 on: April 10, 2014, 07:31:51 AM »
Hi Oskar,

There is something funny with the software you are using to import the CSV file.  I'm glad the semicolon separator works for you, but ExifTool will quote the keywords list and use a comma-space separator otherwise.  With the quotes around the list, it should import into a single cell.  If it doesn't, then your import software isn't parsing the standard CSV format properly.

For example:

Code: [Select]
> exiftool -subject=x -subject=y a.jpg
    1 image files updated

> exiftool -subject -filename -csv a.jpg
SourceFile,Subject,FileName
a.jpg,"x, y",a.jpg

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Oskar

  • Jr. Member
  • **
  • Posts: 26
Re: Writing Keywords to CSV - Not Working
« Reply #4 on: April 10, 2014, 08:22:33 AM »
Hi, Phil! I am using libreOffice. Perhaps I was doing something wrong during the opening of the csv file because in the opening dialog preview the csv file looked fine. For now I will stay with this workflow but I will try and see what's wrong with the normal way. Thank you for your advice and for your valuable software!!!

Oskar

  • Jr. Member
  • **
  • Posts: 26
Re: Writing Keywords to CSV - Not Working
« Reply #5 on: April 15, 2014, 01:04:18 AM »
I found the error I was doing while opening the CSV file: I need to put " in text delimiter field in the opening dialog box. It works like a charm, thank youuuuuuu!

p.s: I installed the Perl version and it is much much faster!
« Last Edit: April 15, 2014, 04:54:57 AM by Oskar »

Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 16687
    • ExifTool Home Page
Re: Writing Keywords to CSV - Not Working
« Reply #6 on: April 15, 2014, 07:08:31 AM »
What Perl are you using?  I have found that the Cygwin Perl is much faster -- I think that is because of better memory handling in Cygwin.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Oskar

  • Jr. Member
  • **
  • Posts: 26
Re: Writing Keywords to CSV - Not Working
« Reply #7 on: April 15, 2014, 12:55:03 PM »
The one recommended in install instructions: Activeperl, http://www.activestate.com/activeperl/