I'm sure you could write a script to do this faster, but with the open edges like that, you could use border select (sub-object mode 3) to grab two borders, hit the bridge button, then grab the new edges and collapse. This will weld the open edges together but not adjust any other verts, which will get what you described…