Save Collections as separate blend file?

is there a method / script to write each collection and its content of a given blend file into separate blend files, each new blend with the name of the collection?

The process should be:

  • Take a blend file x.blend with n collections
  • specify the target folder where to save the output
  • each collection n of x.blend is then saved into the given target folder, named after the collection

Can this be done in phyton? Unfortunately, i have zero phyton experience.

Thanks for help!