I'm using the xmpMM tags and specifically the ResourceEvent structure. I write the tag like this:
exiftool -XMP-xmpMM:History+="[{ \
Action='Initial write of custom metadata', \
InstanceID<OriginalDocumentID, \
Parameters=none, \
SoftwareAgent=exiftool invoked by script, \
When=$today }]"
As you will see, I'm trying to copy the tag OriginalDocumentID to the InstanceID field in the structure. This gives a warning "Invalid structure field at InstanceID".
What is the correct way to do this, please?
I had problems trying to use backslash to continue the command within the quotes, but this worked for me (provided "$today" is a valid EXIF date/time format):
exiftool '-XMP-xmpMM:History+<[{ Action=Initial write of custom metadata, InstanceID=$OriginalDocumentID, Parameters=none, SoftwareAgent=exiftool invoked by script, When='"$today }]"
You main problem was common mistake 5c (https://exiftool.org/mistakes.html#M5).
- Phil
Thank you, will check it out.