search and delete custom tag from image sequence

Started by davidgardener, September 05, 2022, 09:50:06 PM

Previous topic - Next topic

davidgardener

Hi there, I rendered an image sequence from a 3D software. The images are .EXR format. They have embedded into them metadata - "Hostname" - and then the name of the computer that rendered the image. I cannot for the life of me figure out how to delete all the images with the metadata "Hostname RENDER01". (basically all the images that came from my computer called "RENDER01" are incorrect and i want to delete them.
Can anyone help? Ive been trying for a full day now!
It doesnt seem that Hostname is a "normal" tag for OpenEXR, as it doesnt show up in any list. I was thinking I could transfer that data to a tag that is readable in windows and then filter by that. Or somehow search and delete any with RENDER01, or use the function to move anything with RENDER01 to a different directory and then delete that directory.. but no success with any of those.
Thanks so much!!
David

Phil Harvey

Does ExifTool extract this information?  If so, you can use this command:

exiftool -directory=tmp -if "$TAG =~ /RENDER01/" DIR
You just need to determine the TAG name to use in the condition above.  Then delete the "tmp" directory afterwards to remove these files.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

davidgardener

wow!! yes thank you so much! Yes Exiftool does extract this information $hostname is what the tag is. This worked a charm. thanks again Phil. such a useful tool!
-David