Is it possible to export groups to seperate PSD file?

Is there any script can export groups in a psd file to a seperate psd file with group’s name and layers in it?

Original psd
psd 1
psd 2

I have a lot of psd file that need to export the groups like this.
I also found some script but it just save as PNG or JPG.