Hello Exif Community,
my images contain a lot of keywords in xmp-files (xmp:subject).
I would like to delete all keywords that contain a specific string using the exiftool.
Example:
Contained keywords: abc_1, abc_2, abc_3, cde_1, cde_2, cde_3
Keywords to be deleted: abc_1, abc_2, abc_3
Keywords to be obtained: cde_1, cde_2, cde_3
So far I am at the following command:
exiftool 'dir/file.xmp' -overwrite_original -m -'xmp:subject-=~ /abc/' -if '$xmp:subject =~ /abc/'
Unfortunately it does not work.
Do you have an idea?
Thanks for your support.
Al
Try
exiftool 'dir/file.xmp' -overwrite_original -m -sep ',' -if '$xmp:subject =~ /abc/' '-Subject<${Subject@;$_=undef if m/abc/}'