ExifTool Forum

ExifTool => Newbies => Topic started by: Sampoline on March 18, 2021, 10:28:59 PM

Title: A noob having trouble getting command to extract specific tags and order them..
Post by: Sampoline on March 18, 2021, 10:28:59 PM
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!
Title: Re: A noob having trouble getting command to extract specific tags and order them..
Post by: StarGeek on March 18, 2021, 10:45:20 PM
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 (https://exiftool.org/ExifTool.html#GetAllGroups) for the list of groups.
Title: Re: A noob having trouble getting command to extract specific tags and order them..
Post by: Sampoline on March 18, 2021, 11:41:00 PM
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
Title: Re: A noob having trouble getting command to extract specific tags and order them..
Post by: StarGeek on March 19, 2021, 12:56:10 AM
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.
Title: Re: A noob having trouble getting command to extract specific tags and order them..
Post by: Sampoline on March 19, 2021, 02:48:37 AM
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.
Title: Re: A noob having trouble getting command to extract specific tags and order them..
Post by: Phil Harvey on March 19, 2021, 07:45:35 AM
Remove the -g from the command.

- Phil
Title: Re: A noob having trouble getting command to extract specific tags and order them..
Post by: Sampoline on March 24, 2021, 08:37:35 PM
Thankyou Phil that worked perfectly.