ExifTool Forum

ExifTool => Newbies => Topic started by: stephanie on January 13, 2017, 05:49:25 AM

Title: How to remove duplicate tags from supplementalCategories?
Post by: stephanie on January 13, 2017, 05:49:25 AM
Hello Phil,

You already helped me a lot with exiftool. Thank You very much for this.

Now I have a new question about removing duplicate tags:

I have supplementalCategories tags as the following:

"Nature, Trees, Wood, Plants, Pine Trees"
"Trees, Plants, Leaf Trees, Trees"
"Plants, Trees, Nature, Trees, Wood"
"Leaf Trees, Trees, Plants, Trees, Nature, Wood"

And so on...

I want to delete all duplicates of the tag "Trees". But tags containing the word "Trees" (e.g. "Leaf Trees") shall not be deleted.

Which is the correct code to realize this?

Many greetings from

Stephanie
Title: Re: How to remove duplicate tags from supplementalCategories?
Post by: Phil Harvey on January 13, 2017, 07:08:45 AM
Hi Stephanie,

There are various ways to do this.

Here is a command by StarGeek to remove duplicate keywords from images (https://exiftool.org/forum/index.php/topic,7827.msg39826.html#msg39826)

- Phil