Delete Layer, based on name
I came across this script that deletes a layer based on its name,.. which works great on a single instance,
try{
activeDocument.activeLayer = activeDocument.artLayers.getByName("Hello");
activeDocument.activeLayer.remove();
}catch(e){}
Is it possible to modify this, such that it loops through all the layers and deletes those where that name appears? ( including those within a group folder, if possible)
... and also won't error if that layer name doesn't appear within the document.
thanks for any help
