I am using Photoshop CC2015 to modify and then export layers as files. While saving, Photoshop automatically adds a number sequence to the file.

I do not want this numbering. All I want is 'prefix_layername.jpg', not 'prefix_0001_layername.jpg'.

I've read a thread which described a solution for CS5, but this doesn't seem to work for CC2015. I understand we need to edit the 'Export Layers To Files.jsx' which is located at:

/Applications/Adobe Photoshop CC 2015/Presets/Scripts

Can someone give me the changes that need to be made at this file to avoid the numbering?

1 Answer 1


This worked for me in Adobe Photoshop CC 2015.5 on a Mac.

  1. On a Mac, go to Applications > Adobe Photoshop CC 2015.5 > Presets > Scripts > Export Layers To Files.jsx

  2. Open the .jsx file and comment out the the contents of line 1083 by applying two forward slash characters (//) to the beginning of the line. The resulting code will look like this:

    // fileNameBody += "_" + zeroSuppress(i, 4);
  3. Save the .jsx file changes.

  4. Close and reopen Photoshop CC, then run File > Export > Layers to Files...

  • Thank you, worked perfectly, except there is underscore "_". Any idea on getting rid of that. I am using PSD CC 2018
    – alexis
    Jan 23, 2018 at 16:53
  • In PSD CC 2018 you can remove the underscore that is generated between the file name and the "Layer" name by doing the following: 1) search for this line of code (in my file it was at line 2195): fileNameBody += "_" + layerName; 2) change the underscore character between the quote marks to a space character (or whatever character you prefer): fileNameBody += " " + layerName; When you run the script the underscore between the file name and layer name will become a space character.
    – Dan Tabata
    Jan 23, 2018 at 18:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.