Any script to rename blocks and Layers in multiple .3dm files?

Can this BatchSaveSmall.rvb be ported to python?

here: Batch operations in Rhino files - Rhino / Rhino for Windows - McNeel Forum

Is there a way to batch edit files without having to actually having a single Rhino Instance open them all sequentially? Any way to this “headless”?
And if not is there any way to speed it up?