Hi,
I need to rewrite XMP Subject of many images, and I'd like to write on this tag what is on IPTC keywords of each image.
For ex. for the moment one image has :
- XMP Subject = "AAAA,BBB"
- IPTC Keywords = "CCC,DDD"
After modification of this image, I want :
- XMP Subject = "CCC,DDD"
- IPTC Subject = "CCC,DDD"
And I need to do that for more than 300 000 images (with différent tags).
Is there a way that you suggest to do that ?
Thanks a lot for your help.
J. Gautier
To set XMP:Subject from the value of IPTC:Keywords, the command is:
exiftool "-XMP:Subject<IPTC:Keywords" DIR
I think this is what you want to do.
- Phil
Thanks a lot Phil.
One question :
Suppose this command stops (for a reason or another) before the end.
If I execute it again , will it start again from the beginning and write again all files ?
JG
Yes. To avoid rewriting files unnecessarily, you could add this to the command:
-if "$IPTC:Keywords and (not $XMP:Subject or $XMP:Subject ne $IPTC:Keywords)"
- Phil
Ok, thanks.
JG
Sorry, but when I try the command It failed to recognize images that have different XMP:Subjet and IPTC:Keywords.
I put some images in a folder (called "hidef_test"), and type this command :
exiftool -if "$IPTC:Keywords and (not $XMP:Subject or $XMP:Subject ne $IPTC:Keywords)" "-XMP:Subject<IPTC:Keywords" hidef_test
But the command returns :
1 directories scanned
26 files failed condition
0 image files read
Can you understand why ?
JG
Read my signature. Are you on Mac or Linux?
Oh yes, you're right (I'm on linux) : sorry for my mistake.
JG