moving a large number of blogs to multi db

Hello,

I am attempting to move a large number of blogs (about 1,500) from a standard wpmu setup to the multi db setup. I see that you have to sort the blogs by md5 hash of the blog ID then put them into the corresponding db.

What is the best way to move a large number of blogs to the multi db system?

Right Now the only solution I have is to move the blog tables 1 blog ID at a time, any suggestions or scripts to do this?