csv output file format ... columns or rows?

Started by snellius, April 17, 2022, 04:19:42 PM

Previous topic - Next topic

snellius

Yes, I am new in using exiftool. I am trying to create an interface between Filemaker and images, by using exiftool to extract metadata into the database or, vice versa, change/add metadata from the database into images.
I am trying to get exiftool write metadata from some images to a csv file, but ....
the csv file seems to be organized in columns and not rows
I did expect a series of columns (one column for each metadata / tag name) and one row for each image
but the csv file contains rows with all different metadata / tag names with a value in the next column, and after all metadata belonging to an image, a series of rows start for the next image
i.e. I cannot import the csv file into a filemaker table because it creates a record for each metadata/tag for an image
I could, of course, write a script to convert this table to a real table with records for each image, but I think there should be a more efficient way
any experiences with outputting to a csv file?

the command I did use to output to a csv file:

exiftool -g -filename -imagesize -exif:fnumber -xmp:all (pathname)/*.TIF > testoutput.csv
where (pathname) is a correct file path, because the images are found and read by exiftool

any help is very much welcome!

StarGeek

Something else must be happening because the CSV file exiftool creates has one row for each file and the columns are the tag names.

Example output
C:\>exiftool -csv -G -a -s -AllDates -Description y:\!temp\Test4.jpg
SourceFile,EXIF:DateTimeOriginal,EXIF:CreateDate,EXIF:ModifyDate,XMP:Description
y:/!temp/Test4.jpg,2022:04:17 15:21:23,2022:04:17 15:21:23,2022:04:17 15:21:23,Description


Result after loading the file into LibreOffice
"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: snellius on April 17, 2022, 04:19:42 PM
the command I did use to output to a csv file:

exiftool -g -filename -imagesize -exif:fnumber -xmp:all (pathname)/*.TIF > testoutput.csv

You need to add the -csv option.

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