I don’t remember seeing any such script, and I trust Jsprspereira did a decent enough search, so I went ahead and put something together. Haven’t done extensive testing yet, but it seems to work.
I have to say it’s so much nicer having them in order, I should have done this a long time ago.