Is there any way to perform a substitution on a string no matter what tag it is associated with? In other words, if the string "Ettie" appears in multiple places in the metadata, is there any way to change it to "Effie" in all of those locations without having to specify a tag? What if the length of the string changes?
This is not possible with a simple command. To do this you would need to list all tags, filter the ones with the string in them and then replace their values. Doable, but not without some additional scripting.
The API Filter option (https://exiftool.org/ExifTool.html#Filter) allows you to apply an arbitrary filter to the value of all extracted tags:
exiftool -api "Filter=s/Ettie/Effie/g" DIR
So you should be able to do something like this to write these changes back to the file:
exiftool -api "Filter=s/Ettie/Effie/g" -tagsfromfile @ -all:all DIR
This will completely rewrite the metadata of each file, so changing the length of the string isn't a problem.
@Hayo: ExifTool does so much that I have trouble keeping track of it all too! :)
- Phil
Quote from: Phil Harvey on August 09, 2016, 08:04:19 AM
@Hayo: ExifTool does so much that I have trouble keeping track of it all too! :)
Awesome, I stand corrected, this really is a sweet option to use 8)
Once again, thanks so much for your help, guys!
Quote from: Hayo Baan on August 09, 2016, 11:33:50 AM
Awesome, I stand corrected, this really is a sweet option to use 8)
I remember when he introduced this, making a mental note to look into it further, and promptly forgetting about it.
Looking into this, I see I can combine a several old user defined tags, several commands from my bat files, and one annoyingly long script into a single command. Very cool.
Quote from: StarGeek on August 18, 2016, 11:20:49 PM
Looking into this, I see I can combine a several old user defined tags, several commands from my bat files, and one annoyingly long script into a single command. Very cool.
Excellent. :)