Copy link to clipboard
Copied
When I want to use the "export layers to files" function in Photoshop, there's always a prefix of the layer number sequence. For example, I'll export a number of layers (to pngs) and the prefix is _0001, _0002, _0003... I don't think this feature necessary in most cases. I already removed the standard 'File Name Prefix' in this dialog box. But, that doesn't hold true after export. Is there a way to quickly remove this default script?
Or if not possible, is there any recommendations on advance 'file renaming tools' like GREP in InDesign?
For Photoshop CC 2018 go to:
Applications/Adobe Photoshop CC 2018/Presets/Scripts/Layer Comps To Files.jsx
Once you open the file, go to line 209 and comment it out.
I've attached an image for reference.
Once I did this, Photoshop stopped adding the sequence number prefix to when I export Layer Comps To Files.
Copy link to clipboard
Copied
Both Bridge and Lightroom can quickly rename the files for you. As long as all the files are not the same name, you should be fine.
If they are the same name, you could use a date for a unique name, or change the sequence format. Ex. number of 0's before or after the actual number.
Copy link to clipboard
Copied
This tutorial may help you DesignEasy: How to Remove Sequence Numbers and Empty Spaces When Exporting Layers and Layer Comps
Copy link to clipboard
Copied
For Photoshop CC 2018 go to:
Applications/Adobe Photoshop CC 2018/Presets/Scripts/Layer Comps To Files.jsx
Once you open the file, go to line 209 and comment it out.
I've attached an image for reference.
Once I did this, Photoshop stopped adding the sequence number prefix to when I export Layer Comps To Files.
Copy link to clipboard
Copied
This is great, thanks for the tip! Was able to apply this same method on 'Export Files to Layers' removing the starting has marks.
Here is the code to remove the hash for that jsx file. Change 'fileNamePrefix' to layerName, see attached CC 19
 
Copy link to clipboard
Copied
hi! what did you change in the code?? I managed to get to that part of the image but what should I do next?
Copy link to clipboard
Copied
You can (should) edit that file and save it back.
Copy link to clipboard
Copied
Thank you!
Randy
Copy link to clipboard
Copied
On windows machines in powershell after some trial and error I found the following command running in the same folder as the files I want to rename did the trick regardless of whether you specify a prefix or not. change the file type extension accordingly after the *
Get-ChildItem -Filter '*.png' |
Rename-Item -NewName { $_.Name -replace '_\d+s+_\d+_', '_' }
Tip of the hat to this thread with a little extra help from ai
Copy link to clipboard
Copied