ExifTool Forum

General => Metadata => Topic started by: davidgardener on September 05, 2022, 09:50:06 PM

Title: search and delete custom tag from image sequence
Post by: davidgardener on September 05, 2022, 09:50:06 PM
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
Title: Re: search and delete custom tag from image sequence
Post by: Phil Harvey on September 06, 2022, 08:07:20 PM
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
Title: Re: search and delete custom tag from image sequence
Post by: davidgardener on September 06, 2022, 09:18:37 PM
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