Insert line between fields when extracting to CSV file

Started by BrianM, October 05, 2022, 01:46:22 PM

Previous topic - Next topic

BrianM

Hello.What I do with exiftool is pretty basic.
I store data in the TITLE and DESCRIPTION fields.
I can easily extract all those fields from a folder of jpgs into a csv file, the only problem is it runs into one long string.
Is there a way to insert a blank line into the file between each jpg?

Thank you very much.

StarGeek

What is the exact command you're using?  Because the -csv option places each file and data on a separate line.  Not as a single long string.

Example
C:\>exiftool -Description -Headline -csv >test.csv y:\!temp\Test3.jpg y:\!temp\Test4.jpg
    2 image files read

C:\>type test.csv
SourceFile,Description,Headline
y:/!temp/Test3.jpg,Description,Headline
y:/!temp/Test4.jpg,Description,Headline
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

Joanna Carter

I think what Brian wants is to have an additional "spacer" line between each line.

StarGeek

Probably, but the "single long string" stands out as a possible problem.  That suggest output like this
SourceFile,Description,Headline y:/!temp/Test3.jpg,Description,Headline y:/!temp/Test4.jpg,Description,Headline
To clarify, there isn't any option for changing the output of the -csv option beyond changing the delimiter with the -csvDelim option.

To have more control over the output, you have to create your own csv format using the -p (-printFormat) optionFAQ #12 has some tips on doing this.
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).