Merge tags in duplicate entries

I’ve not surprisingly imported multiple duplicate documents into a db and I’m in the process of reviewing and culling the duplicates. As part of this process, multiple versions of the same document will have different tags applied based on the grouping of the documents at import.

Is there a way to merge the tags from all copies of one document into a preferred copy before moving the remaining duplicate copies to the trash?

Thanks in advance!

I’d use a script for that because I’m not experienced enough to try it with smart rules. Might well be possible with those, too.

Thanks. I’ll look into that. Ultimately, I want to be able to choose which of the duplicates I keep and which go to trash, and in some cases there may be two copies of a file, in others there may be six, so it may make scripting the process a challenge.

Why? Just merge the tags of all the n duplicates and then delete n-1.