Hi!
I've tried to make IPTC Copyright notice «© Organisation, 2004.» look like «© Author, 2004., © Organisation, 2004.» by doing this:
exiftool "-iptc:CopyrightNotice<${iptc:CopyrightNotice;s/Organisation/${iptc:Credit}/}, ${iptc:CopyrightNotice}" a.jpg
but it didn't work.
What should I do instead?
Interesting construct, but ExifTool doesn't support tag variables within advanced formatting expressions. Instead, try this:
exiftool "-iptc:CopyrightNotice<${iptc:CopyrightNotice;my $credit=$self->GetValue('Credit') or $_=undef, return;s/Organisation/$credit/}, ${iptc:CopyrightNotice}" a.jpg
Also, in the future "it didn't work" isn't very helpful. The command should have given his warning which would have been useful to know:
Warning: syntax error for 'iptc:CopyrightNotice' - a.jpg
- Phil
Oh, wow, thank You, Phil! I would never figure it out! It works :)
Quote from: Phil Harvey on July 21, 2023, 08:13:16 AMAlso, in the future "it didn't work" isn't very helpful. The command should have given his warning which would have been useful to know:
The only answer to "it didn't work" is "it works here" (though yes, it isn't true in this situation). I'm still trying to come up with a more polite way of saying things like that as a standard response template.