Photoshop: Hide prefix number when we export layers in files

  • 1
  • Question
  • Updated 4 months ago
  • Answered
  • (Edited)
Hello,
How we can hide the default prefix number when we export layers in files ?
Thanks
Photo of Baptiste Chevalier

Baptiste Chevalier

  • 3 Posts
  • 1 Reply Like

Posted 1 year ago

  • 1
Photo of Jeffrey Tranberry

Jeffrey Tranberry, Sr. Product Manager, Digital Imaging

  • 16849 Posts
  • 2819 Reply Likes
You would have to modify the Export Layers To Files.jsx file

Lines 2193 and 2195 as follows:

        //fileNameBody += "_" + zeroSuppress(i, 4);

        fileNameBody += layerName;
Photo of Jay Cray

Jay Cray

  • 1 Post
  • 0 Reply Likes
I'm not a coder but i'm in a major bind, is there any way I can pay you to remotely set this up on my computer? my email is gigsbyjenna@ gmail 

Thanks!!
Photo of eartho

eartho, Champion

  • 1390 Posts
  • 464 Reply Likes
Jenna, you don't need to be a coder for this, just use a text editor.

- use the find file function on your machine to search for  Export Layers To Files.jsx 
- make a a duplicate, so you can revert if needed
- open the file in text editor and make the change as shown above
- save

done.
Photo of David Converse

David Converse

  • 908 Posts
  • 264 Reply Likes
Make a copy of the script file first! Then make the changes and relaunch Photoshop.
Photo of Baptiste Chevalier

Baptiste Chevalier

  • 3 Posts
  • 1 Reply Like
1. Open in Dreamweaver or other code software (txt is right) "Export Layers To Files.jsx" (C:\Program Files\Adobe\Adobe Photoshop CC 2019\Presets\Scripts)
2. Remplace Lines 2193 and 2195

        fileNameBody += "_" + zeroSuppress(i, 4);

        fileNameBody += "_" + layerName;

as follows:

        fileNameBody +="";

        fileNameBody +=layerName;

3. Save
Photo of Baptiste Chevalier

Baptiste Chevalier

  • 3 Posts
  • 1 Reply Like
Thanks :)
Photo of Clif Watson

Clif Watson

  • 5 Posts
  • 0 Reply Likes
I'm going to take these steps, to remove the labeling on the files when they batch export. Quick question though. Assuming that since you are editing a script in the Preset file, this is a fix you have to do each and every time the application is updated. Yes?
Photo of Jeffrey Tranberry

Jeffrey Tranberry, Sr. Product Manager, Digital Imaging

  • 16849 Posts
  • 2818 Reply Likes
You should just be able to replace the entire JSX file. That would only have to be done for major versions, though.