Close
Write a script and deduplicate them yourself is your only solution.

At least the post id is in the filename so it should be easy.

And yes, relying on the filenames to get the tags of a post isn't reliable and will never be.