ExifTool Forum

ExifTool => Newbies => Topic started by: Chris.Spears on June 21, 2017, 09:13:22 PM

Title: Trouble overwriting custom tag values
Post by: Chris.Spears on June 21, 2017, 09:13:22 PM
Hi!

I am running version 10.05 of the ExifTool on Windows 7.  I have run into a perplexing issue.  I have a Python script that uses the ExifTool to write custom XMP tags (Dublin Core namespace) to a Photoshop file.  The script just runs the command line command from within Python.
However, sometimes I need to overwrite my tags with new data.  I can query one of the tags:

>exiftool.exe -XMP-dc:FMID test.psd
Fmid                            : 1234

However, when I try to assign a new value or just delete the old value, I get these results:

>exiftool.exe -XMP-dc:FMID=1235 test.psd
Warning: Tag 'FMID' does not exist
Nothing to do.

>exiftool.exe -XMP-dc:FMID=1235 -overwrite_original test.psd
Warning: Tag 'FMID' does not exist
Nothing to do.

>exiftool.exe -XMP-dc:FMID= -overwrite_original test.psd
Warning: Tag 'FMID' does not exist
Nothing to do.


Changing "-XMP-dc:FMID" to "-XMP-dc:Fmid" does not help.

However, I do write data (which I call "keywords") to the Subject tag.  I can query and delete that.


>exiftool.exe -XMP-dc:Subject test.psd
Subject                         : test, test, test

>exiftool.exe -XMP-dc:Subject= -overwrite_original test.psd
    1 image files updated


Of course the Subject tag is not a custom tag.  It is a tag that Photoshop normally assigns to the image.  Any ideas on what I am doing wrong?
Title: Re: Trouble overwriting custom tag values
Post by: StarGeek on June 21, 2017, 11:05:18 PM
From the XMP tag page (http://www.exiftool.org/TagNames/XMP.html):
"ExifTool will extract XMP information even if it is not listed in these tables, but other tags are not writable unless added as user-defined tags in the ExifTool config file."

Exiftool can't write to this tag without a config file that defines it.  So there should be a config file someplace that your script references.
Title: Re: Trouble overwriting custom tag values
Post by: Chris.Spears on June 22, 2017, 01:09:50 PM
Okay.  I found the config file.  Now it works!  Thanks![


> exiftool.exe -config exiftool.config -XMP-dc:FMID test.psd
Loaded!
FMID                            : 1234
> exiftool.exe -config exiftool.config -XMP-dc:FMID= -overwrite_original test.psd
Loaded!
    1 image files updated
> exiftool.exe -config exiftool.config -XMP-dc:FMID test.psd
Loaded!
Title: Re: Trouble overwriting custom tag values
Post by: StarGeek on June 22, 2017, 01:11:33 PM
Happy to have helped.  ;D