Is it possible to remove a line in a caption ? I inhereted a digital photoarchive from a passed away collegue and I have to remove the copyrightline that he did place in the caption in about 40.000 pictures. The rest of the caption must stay intact.
Thanks for your help
This is easy using the very-soon-to-be-released ExifTool 9.15, like this:
exiftool "-caption-abstract<${caption-abstract;s/Copyright.*//}" FILE
(The quoting above is for windows, and I am assuming that you want to edit the Caption-Abstract tag and that the copyright line starts with the word "Copyright".)
- Phil
ExifTool 9.15 is now available.
A problem with the command I gave above is that it will leave the newline character. I think this may remove it too:
exiftool "-caption-abstract<${caption-abstract;s/Copyright.*\\n//}" FILE
but I can't test this. The only question is how to escape the backslash on the Windows command line, but I think the double backslash should do it.
- Phil
Quote from: Phil Harvey on January 27, 2013, 01:56:22 PM
This is easy using the very-soon-to-be-released ExifTool 9.15, like this:
exiftool "-caption-abstract<${caption-abstract;s/Copyright.*//}" FILE
Thank you so very much for this!! I'll certainly be giving it a workout.
Quote from: Phil Harvey on January 27, 2013, 03:17:19 PM
but I can't test this. The only question is how to escape the backslash on the Windows command line, but I think the double backslash should do it.
Single backslash seems to work fine. I tested
ExifTool "-caption-abstract<${caption-abstract;s/\n/\r\n/g}" Test.jpgAnd it replaced all LFs with CR+LF.
GREAT ;-)
I will try that tomorrow
thanx
roel