Generate two differently named sets of instances

Is there a good way to generate two differently named sets of instances? It would be instances where everything is identical except the name. It can’t be done manually, it must be automated in some form. Ideas?

Several options.

  1. You can duplicate all instances and set a different name.
  2. You can write a script that exports all (active) instances, but also exports a duplicate where only the name is changed (recommended method).
  3. Use a third-party tool like fonttools to edit the name tables of a duplicate set of exports.

Or use a project file to tuck away the extra instances.

Thank you Georg. The perfect solution.