Hi folks,
is there a way to delete a structure by only specifying a field name without the
value (e.g. using a placeholder for the value)?
I mean something like this (but it doesn't work):
exiftool -RegionExtensions-="{XMP-iptcExt:LocationShownSublocation=*}" test.xmp
The goal of this example is to remove all RegionExtension structures that contain a LocationShownSublocation field.
Any suggestions?
Are you talking about the MWG RegionExtensions (https://exiftool.org/TagNames/MWG.html#Extensions)? If so, probably not. Otherwise, Phil will have to respond and he's away for a couple of weeks. You can hit the Notify button in the upper right corner of this thread to get a notification when there is a response.
@StarGeek: Thanks for your quick reply.
Yeah, I'm talking about MWG RegionExtensions. Why do you think, it's not possible to manipulate MWG RegionExtensions with placeholders (or something alike) but it may be possible with other kinds of structs?
Structures are very complicated to begin with and adding an arbitrary structure as would be done with the RegionExtensions increases that tremendously. As it says in that link, RegionExtensions can only be written as full structures.
Though, giving it some further thought, it probably would be possible to do with user defined tag. Internally, structures are Perl hashes and I would think that traversing the hash elements looking for the one you want to delete might be possible. But that would be more of a hard coded solution.