The Photoshop scripting guru Paul R over at RetouchPro has created a really cool script to batch rename and number selected Photoshop layers. I haven't found anything similar on the Illustrator side.

He's given permission for me to post it here in my hopes that some Illustrator scripting genius could come up with a similar script for Illustrator. Would it be terribly difficult to convert this into something Illustrator could use?

here you go, as I said, there's no access to "active layers" in illustrator, so we have to resort to workarounds. In this case the script will change the "visible" layers, hide layers you want to keep unchanged.