News:

2023-03-15 Major improvements to the new Geolocation feature

Main Menu

How to specify exif metadata to include in csv file

Started by ronseese, July 03, 2019, 01:58:14 PM

Previous topic - Next topic

ronseese

New user here.
These commands work great, as they create a csv file from my collection:
exiftool -r -a -csv pictures > all.csv
and
exiftool -r -common -csv pictures > common.csv

I would like to customize the fields which are in the csv file, I have a list of exif tags that I would like to include, there are 37 of them. How would I compose the command line?
Thanks, Ron


StarGeek

You would specify the tags on the command line.
exiftool -r -TAG1 -TAG2 -TAG3 -csv pictures > common.csv

37 tags might get a bit unwieldy, so you could look into creating an arg file (see -@ (Argfile) option), which would look like this
-r
-csv
-TAG1
-TAG2
-TAG3

and then you would call the arg file from the command line
exiftool -@ Argfile.Args /Pictures/ >common.csv

You have to make sure you use the actual tag names (see -s (short) option and FAQ #2) not the description names.
* 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).

ronseese

That worked perfectly, almost, I had to move the -r to the command line and not the argument file, complained about it being a TAG.
Thanks!
Now I just need to do some data analysis to find out my favorite focal length.
Nice tool, BTW.
Ron

StarGeek

Quote from: ronseese on July 03, 2019, 02:23:57 PMcomplained about it being a TAG.

You probably had a leading or trailing whitespace.  This makes a difference in an arg file.  Arg files have to be exact and without quotes, unlike the command line.
* 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).

ronseese

Quote from: StarGeek on July 03, 2019, 03:26:57 PM
Quote from: ronseese on July 03, 2019, 02:23:57 PMcomplained about it being a TAG.

You probably had a leading or trailing whitespace.  This makes a difference in an arg file.  Arg files have to be exact and without quotes, unlike the command line.

ok, thanks.