This script will unlock and make visible all layers and, recursively, their sub-layers. It will then copy each top-level layer into a new illustrator file and save it on the desktop.
Todo: Make a file dialog instead of saving to desktop.
Save Export Layers.jsx
in your scripts folder.
- Windows:
Program Files\Adobe\Adobe Illustrator <version>\Presets\<language>/Scripts
- OS X:
/Applications/Illustrator <version>/Presets/<language>/Scripts