This script allows you to batch rename layers in Illustrator.
The script used to only works with string replacement. Regular expressions was eventually added.
Plus, for my needs, I added the name of the single symbol from each layer.
I had this Ai structure:
Layer1
----SymbolA
Layer2
----SymbolA
Layer3
----SymbolB
and I wanted to have:
Layer1-SymbolA
----SymbolA
Layer2-SymbolA
----SymbolA
Layer3-SymbolB
----SymbolB
So i tweaked te script to use regex AND to insert the symbol's name at the right place.
Save ai-layer-renamer.jsx
in your scripts folder.
- Windows:
Program Files\Adobe\Adobe Illustrator <version>\Presets\<language>/Scripts
- OS X:
/Applications/Adobe Illustrator <version>/Presets/<language>/Scripts
Run it from ExtendScript Toolkit.
- Make sure you have coffeescript installed.
- Run
cake watch
from the root of folder. - Run
cake build
to output .jsx file.
If you experience issues with the script as some people have, check out this issue for an alternative solution by SheepDomination.