Here's a script you can try --
Inner layer and outer layer must:
- be separate meshes
- have the same topology
- have frozen transforms
unzip the attached file to your scripts directory.
Select the two layers and run:
import makeBorder as mb
mb.make_border()
When you combine all three objects after making the border, don't forget to merge vertices and conform normals. (make sure normals are all pointing out)