Create a gist now

Instantly share code, notes, and snippets.

Order Layers Alphabetically in Photoshop
var layers = activeDocument.layers;
var layersArray = [];
var len = layers.length;
// store all layers in an array
for (var i = 0; i < len; i++) {
// sort layer top to bottom
for (i = 0; i < len; i++) {
layersArray[i].move(layers[i], ElementPlacement.PLACEBEFORE);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment