Hello again,
Is there a command line that will list the tag name g1 attributes in a file? I would like the output to look something like:
System
File
IFD0
ExifIFD
IFD1
IPTC
xmp-xmp
I would also like to learn how to get a list of G0 attributed, with an output something like this.
EXIF
IPTC
XMP
Thanks again for your help!
You could do this:
exiftool -g1 FILE | grep -e ----
- Phil
I may be wrong but what I think they want is the -listg option (https://exiftool.org/exiftool_pod.html#list--listw--listf--listr--listwf--listg-NUM--listd--listx).
For example
C:\>exiftool -listg
Groups in family 0:
AFCP AIFF APE APP0 APP1 APP11 APP12 APP13 APP14 APP15 APP3 APP4 APP5 APP6
APP8 ASF Audible Canon CanonVRD Composite DICOM DNG DV DjVu Ducky EXE EXIF
ExifTool FITS FLAC FLIR File Flash FlashPix Font FotoStation GIF GIMP GeoTiff
GoPro H264 HTML ICC_Profile ID3 IPTC ISO ITC JFIF JPEG JSON JUMBF Jpeg2000
LNK Leaf Lytro M2TS MIE MIFF MNG MOI MPC MPEG MPF MXF MakerNotes Matroska
Meta Ogg OpenEXR Opus PDF PICT PLIST PNG PSP Palm PanasonicRaw Parrot PhotoCD
PhotoMechanic Photoshop PostScript PrintIM QuickTime RAF RIFF RSRC RTF
Radiance Rawzor Real Red SVG SigmaRaw Sony Stim Theora Torrent Trailer VCard
Vorbis WTV XML XMP ZIP
C:\>exiftool -listg2
Groups in family 2:
Audio Author Camera Device Document ExifTool Image Location Other Preview
Printing Time Unknown Video
I didn't use -listg1 as that is a much longer list.
Thank you for your replies StarGeek.
-listg, I think lists all group names available in ExifTool. I am looking for a way to do something like "-listg FILE" to list only the groups embedded in the file.
With the ExifTool output, I will build a selectable list. So I want to extract just the group Names embedded, without the tag names. The easiest for me is if I could get a list of all group names in Family 0 and 1. Or all group names if that's easier.
The end result of the "selectable list" would go to the command line.
Example:
-XMP:All To retrieve all tags in family 0 -XMP.
-EXIF:All To retrieve all tags in family 0, Information Type -EXIF.
-IFD0:All To retrieve all tags in family 1, Specific location -IFD0
List all group names in one output would make it easiest.
I will need to build an array from the group names.
Ah yeah, somehow my brain just didn't register the "in a file" part :D
Exiftool doesn't have that ability. You'll have to parse the output like Phil's example.
Quote from: Phil Harvey on April 22, 2022, 07:25:08 AM
You could do this:
exiftool -g1 FILE | grep -e ----
- Phil
Thank you Phil, that is a good tip. I'm looking at the windows command equivalent to grep, findstr, and might find a solution there.
There is a port of various Unix utilities (http://unxutils.sourceforge.net/) available for Windows. They work quite well.
Quote from: dwlott on April 22, 2022, 08:26:29 PM
Quote from: Phil Harvey on April 22, 2022, 07:25:08 AM
You could do this:
exiftool -g1 FILE | grep -e ----
- Phil
Thank you Phil, that is a good tip. I'm looking at the windows command equivalent to grep, findstr, and might find a solution there.
exiftool -g1 FILE | findstr/C:"----" is the solution in windows. Thank's guys for helping me find the easiest way to use this excellent tool.