In Illustrator, you can use the following to find and replace layer names:
var doc = app.activeDocument;
// name indexed object
var layernames = {
'Bob':'Bob Front'
};
// loop through all layers
for (var i = 0; i < doc.layers.length; i++)
{
//Set up Variable to access layer name
var currentLayer = app.activeDocument.layers[i];
if (layernames[currentLayer.name])
{
currentLayer.name = layernames[currentLayer.name];
}
}
In this script "Bob" will become "Bob Front". Is there something similar for Photoshop. Looking at the Photoshop scripting guide, this script should work as the active App document and layers methods exist in Photoshop.