A noob having trouble getting command to extract specific tags and order them..

Started by Sampoline, March 18, 2021, 10:28:59 PM

Previous topic - Next topic

Sampoline

Hi all,

First time posting. I'm running ExifTool (12.22) to output a CSV file with all tags for TIF's in a location.

Currently running: exiftool -G4 -ext TIF -d %%d/%%m/%%y" "%%H:%%M:%%S -r -csv LOCATION > LOCATION\FILENAME.csv

This gives me all the tags, but I'm having trouble figuring out how to specify only the tags I want and have the columns in alphabetical order (this isn't a priority but would be nice).

I've attached a picture of the tags I want.

Thanks!

StarGeek

Look at the header of your CVS output that contains everything.  Select the tags you want to display.  Place the text in the header on the command line with a dash in front of it.  For example, if you wanted to list the FileModifyDate, you would just add -FileModifyDate to the command.

I'd suggest using a lower -G number.  -G4 isn't that useful unless you know you have duplicated tags or blocks.  See here for the list of groups.
* 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).

Sampoline

Sorry @StarGeek, this command was created by a previous employee that doesn't work with us anymore. So I don't know too much about Exiftool.

Do you mean like:

exiftool -g -ext TIF -FileModifyDate -XResolution -YResolution -d %%d/%%m/%%y" "%%H:%%M:%%S -r -csv LOCATION > LOCATION\FILENAME.csv

StarGeek

Yes, along those lines.  List the tags you want and in the order you want.

I'm guessing that this is in a Windows batch file?  Because on the command line the percent signs shouldn't be doubled, but it's required for a batch file.

And I would probably change -d %%d/%%m/%%y" "%%H:%%M:%%S to -d "%%d/%%m/%%y %%H:%%M:%%S" as it's a bit clearer as to what is being attempted there.
* 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).

Sampoline

Thankyou this is working now.

Is there a way though to remove the "EXIF:" from the headers.

I've attached an image to show you what I mean. How would I do that?

Thanks.

Phil Harvey

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