Is it possible to get the current contents of a tag while doing a WriteAlso in a user defined tag?
For example, if I want to write to HierarchicalSubject based upon what values are already in that tag, is it possible to access the current contents of HierarchicalSubject, do some operations, and then pass the new values back to the WriteAlso routine?
The end goal is to create a tag in which I can pass a keyword to the user defined tag (e.g. "John Smith"), which would then check to see if any HierarchicalSubject elements have that keyword ("Friend|John Smith", "Family|John Smith") and then pass all the matches back to WriteAlso. While this wouldn't be useful for adding tags, it would help with removing tags. So -MyTag-="John Smith" could be used to remove both "Friend|John Smith", and "Family|John Smith".
Just an idea I had and certainly not worth trying to add the ability to exiftool if it's not currently possible.
No, this isn't possible. The WriteAlso values are determined before the first file is processed, so they can't be set dynamically like this. The only way to do something with the existing value would be like this:
"-mycompositetag<HierarchicalSubject"
In this case, new new value in the WriteAlso expression ($val) is the existing value of HierarchicalSubject.
- Phil