I cannot enter values ​​to two labels :(

Started by anta, March 30, 2021, 10:35:43 PM

Previous topic - Next topic

anta

Hi everyone!!!,

I just started using exiftool and I liked it a lot, so much that I made my second example.config. It works fine, except for the ExpirationDate and FileName tags.
In ExpirationDate I need the value of this label to be "None", when executing the command line I get an error that says: Warning: Invalid date format (use YYYY: mm: dd) in IPTC: ExpirationDate (ValueConvInv) and the tag FileName y need the value of this label to be "Dependent", I executing the command line and I don't get any error, but the changes made do not appear in the metadata :(. Can you help me please?, I already used up all the ideas I had in mind.


This example.config is a version of the first one I did and which I never had errors, the first example.config I lost when my computer died :(


%Image::ExifTool::UserDefined = (
    'Image::ExifTool::XMP::Main' => {
        BioLifePro => { # <-- must be the same as the NAMESPACE prefix
            SubDirectory => {
                TagTable => 'Image::ExifTool::UserDefined::BioLifePro',
                # (see the definition of this table below)
            },
        },
    },
);

%Image::ExifTool::UserDefined::BioLifePro = (
    GROUPS => { 0 => 'XMP', 1 => 'XMP-BioLifePro', 2 => 'Image' },
    NAMESPACE => { 'BioLifePro' => 'http://ns.myname.com/BioLifePro/1.0/' },
    WRITABLE => 'string', # (default to string-type tags)
    BrandName => { Writable => 'lang-alt' },
    ExpirationDate => { string => 'lang-alt' },
    FacingIndicator => { Writable => 'lang-alt' },
    FileName => { Writable => 'lang-alt' },
    Gdti => { Writable => 'lang-alt' },
    Gtin => { Writable => 'lang-alt' },
    ProductName => { Writable => 'lang-alt' },
    ValidFromDate => { Writable => 'lang-alt' },

    );

Phil Harvey

There is an IPTC tag called ExpirationDate, so you need to specify XMP:ExpirationDate to write the one in your config file (or better yet, XMP-BioLifePro:ExpirationDate).

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

StarGeek

And the same problem with Filename since exiftool uses that to rename files (see Writing "FileName" and "Directory" tags)

I copied your config file and it ran correctly once the tag names are explicitly defined
C:\>exiftool -config temp.txt -all:all= -P -overwrite_original -XMP-BioLifePro:ExpirationDate=XMP-BioLifePro:ExpirationDate -XMP-BioLifePro:FileName=XMP-BioLifePro:FileName  y:\!temp\Test4.jpg
    1 image files updated

C:\>exiftool -g1 -a -s -xmp:all y:\!temp\Test4.jpg
---- XMP-x ----
XMPToolkit                      : Image::ExifTool 12.22
---- XMP-BioLifePro ----
ExpirationDate                  : XMP-BioLifePro:ExpirationDate
FileName                        : XMP-BioLifePro:FileName
* 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).