As a designer I often have to edit and export images in batch with Adobe Photoshop. By default the function “Export Layers to Files” will add a number sequence for each file.
This is unnecessary for such scenario and a waste of time to rename very single file especially if you’re exporting 50~80 images per batch. And I did painstakingly renamed every single file when I was a junior designer. ლ(ಥ Д ಥ )ლ
How to remove the number sequences?
This default setting can’t be changed in Photoshop’s main menu; you need to change the coding in the script instead. And here’s the way to change it:
- Locate the file “Export Layers to Files.jsx”
- Find it at [your drive]:Program Files\Adobe\Adobe Photoshop CC 2019\Presets\Scripts
- Copy and paste the file “Export Layers to Files.jsx” somewhere, e.g., Desktop, rename it.
- Now open the file with Wordpad.
- Search for the line fileNameBody += “_” + zeroSuppress(i, 4); and add // infront like this,
// fileNameBody += “_” + zeroSuppress(i, 4); - Next, search for the line fileNameBody += “_” + layerName; and change it to fileNameBody += layerName;
- Save the file and close it. Paste the file into [your drive]:Program Files\Adobe\Adobe Photoshop CC 2019\Presets\Scripts
- Run Adobe Photoshop and you will see 2 lines of “Export Layers to Files..”. One of the options will export without the number sequences.
Why do I do this? Having 2 sets of scripts will prevent Adobe from overwriting the file during the software updates.
*Updates on 17th Nov 2019
There seems to have some changes with Photoshop CC 2020’s script.
Download this script file if you’re using the latest Photoshop CC 2020 here.
There seems to have some changes with Photoshop CC 2020’s script.
Download this script file if you’re using the latest Photoshop CC 2020 here.
15 thoughts on “Photoshop CC – Removing Number Sequence for Export Layers to Files”
script cc 2020 works on cc 2019. Thanks!!!
Awesome and welcome! 😀
it doesn’t have that line
Hi. maybe you can try searching for a word, e.g. “fileNameBody” only. I can’t find the whole line when I use notepad to open the file. Hope this works. 😀
So thankful, great work!
Welcome! 😀
Just Awesome!!!!! I have been trying to do this for months! downloaded your script and it works beautifully!!!!! Thanks!!! Thanks!!! Thanks!!!! Sooooooo much!!!!
Haha, am glad it helps! 😀
Muito obrigado amigo!
You are very welcome!
hi im using photoshop 21.2.4 I can’t find fileNameBody += “_” + zeroSuppress(i, 4);
Hi Steve, can you try searching part of the word instead? For example, zeroSuppress
Hi there MATTO!
I’m really glad I have found your guide, but I got an issue, i can’t find “fileNameBody += “_” + layerName; and change it to fileNameBody += layerName;”
I am using Photoshop 2021 22.0.0 Release.
Can you upload a script for that version, or help me what line should I search for instead of the above one?
Thanks for your help in advance
Hi Simon, I’ve switched to Affinity Photo and Photoshop CS6. Can you email the file to me @ [email protected] to have a look?
We are a group of volunteers and starting a new scheme in our community. Your site provided us with valuable info to work on. You have done an impressive job and our entire community will be thankful to you.