Looking for a JSFL script to prefix layers names with numbers in the timeline
I need this to only run on layers in the active/open timeline and not go diving into symbols, etc.
So for example, the layers…
Man
Woman
Dog
Background
Would change to…
01 Man
02 Woman
03 Dog
04 Background
I found this in the Illustator forum, and I assumed the syntax would be similar but I can't get it to work.
var docRef = app.activeDocument;
with (docRef) {
for (var i = 0; i < layers.length; i++) {
layers.name = layers.length - i;
}
}
Any help is appreciated!
