Script saves each layer in a separate ai-file. If a layer has a "lock" attribute it saves with each separate file. If a layer has a "non print" attribute it not saves as a separate file. Sorry, for my english :).