Copy widths from one file to another?

Is there a quick way, or a script that can copy the widths of all glyphs from one file and paste it to another? Something similar to the “Copy sidebearings” script but for the width of the glyphs.

I updated the script to include that option.

Wow, thank you for this :)). This option is very helpful, just saved me hours of work :).