ExifTool Forum

ExifTool => The "exiftool" Application => Topic started by: Martin Z on May 13, 2023, 12:04:07 PM

Title: Option to ignore unrecognised columns in CSV
Post by: Martin Z on May 13, 2023, 12:04:07 PM
@StarGeek - This is one of the sub-points I included in my monolithic post a little while ago (think at the time you weren't sure) so thought I would split it out as a separate question to...
(a) get a definitive answer please, and/or...
(b) check with Phil (or anyone else) if they know how this can be done


CONTEXT: An issue that is causing repeated headaches for me (albeit admittedly because of my own processes/scripts) is EXIFTool error-ing because the CSV I am trying to import contains some additional columns [used for reference data / other apps] that aren't tag names.

QUESTION: Is there an option to tell EXIFTool essentially "ignore any columns that are not recognised, skip these and process the rest of the file/columns"?

In the interim, I have been manually creating duplicate CSVs with these reference columns removed, but this is a little irksome.

Thanks in advance!
- Martin
Title: Re: Option to ignore unrecognised columns in CSV
Post by: StarGeek on May 13, 2023, 12:17:42 PM
What error are you having with this?  I just created a csv file with three actual tag names and three non-tag names.  Exiftool loaded and set the tag changes and ignored the other columns

C:\>exiftool -G1 -a -s -offsettime* y:\!temp\Test4.jpg
[ExifIFD]       OffsetTime                      : -05:00
[ExifIFD]       OffsetTimeOriginal              : -05:00
[ExifIFD]       OffsetTimeDigitized             : -05:00

C:\>type test.csv
SourceFile,ExifIFD:OffsetTime,ExifIFD:OffsetTimeOriginal,ExifIFD:OffsetTimeDigitized,column1,column2,column3
y:/!temp/Test4.jpg,+04:00,+04:00,+04:00,123,456,789

C:\>exiftool -P -overwrite_original -csv=test.csv y:\!temp\Test4.jpg
    1 image files updated

C:\Programs\My_Stuff>exiftool -G1 -a -s -e --file:all y:\!temp\Test4.jpg
[ExifTool]      ExifToolVersion                 : 12.62
[IFD0]          XResolution                     : 72
[IFD0]          YResolution                     : 72
[IFD0]          ResolutionUnit                  : inches
[IFD0]          YCbCrPositioning                : Centered
[ExifIFD]       ExifVersion                     : 0232
[ExifIFD]       OffsetTime                      : +04:00
[ExifIFD]       OffsetTimeOriginal              : +04:00
[ExifIFD]       OffsetTimeDigitized             : +04:00
[ExifIFD]       ComponentsConfiguration         : Y, Cb, Cr, -
[ExifIFD]       FlashpixVersion                 : 0100
[ExifIFD]       ColorSpace                      : Uncalibrated
[XMP-x]         XMPToolkit                      : Image::ExifTool 12.62
[XMP-exif]      DateTimeDigitized               : 2023:04:13 10:42:25+03:00