Skip to content

Instantly share code, notes, and snippets.

@xupefei
Created April 29, 2013 11:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xupefei/5481027 to your computer and use it in GitHub Desktop.
Save xupefei/5481027 to your computer and use it in GitHub Desktop.
CatSystem2 layer_rename.jsx
#target photoshop
app.bringToFront();
var layers = activeDocument.layers;
for (var i = 0; i < layers.length; i++) {
if(layers[i].name[0] == '[')
layers[i].name = layers[i].name.replace(".png", "");
else
layers[i].name = "@(" + layers[i].name.replace(".png", "") + ")";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment