Skip to main content
New Participant
July 3, 2013
Question

Export Layers To Files - Renaming Script PS CC

  • July 3, 2013
  • 3 replies
  • 4468 views

On all previous versions of Photoshop, including CS6 (before the recent update to PS CC), I was able to use the ExtendScript Toolkit to edit the PS preset script that adds naming/numbering sequences to files when running the "Export Layers to Files" script. For PS CS 6, I edited the script to remove the automatic naming/numbering of exported layers by editing the following in ExtendScript Toolkit:

In ExtendScript Toolkit CS6 open the Export Layers to Files.jsx (applications/adobe photoshop cs6/presets/scripts/export layers to files.jsx)

on line 1030:

change:

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

to:

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

on line 1031:

change:

fileNameBody += "_" + layerName;

to:

fileNameBody += "" + layerName;

This solved my problem and allowed PS to export my layers to files, keeping the layer name as the filename without adding any naming or numbering sequences to the filename. However with the recent release of Photoshop CC, the script change above does not work. It looks as though there are some new lines of scripting with Photoshop CC and I would love to know what else I need to change to prevent PS CC from renaming files when using the Export Layers to File script. Without the ability to change this, I will have to go through numerous steps in bath rename in Bridge, which when working with 100's of files with different naming structures would totally slow down my workflow. Any ideas on what to update in the Photoshop CC Script to fix this? Thanks so very much!

This topic has been closed for replies.

3 replies

New Participant
September 10, 2013

Thanks for the tip. It didn't work for me in CS6 at first. I had to additionally add the "//" to line 1048 to get it to work.

on line 1048:

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

to 

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

Inspiring
July 4, 2013

From the path you posted it looks like you are on a Mac so this may not help. On Windows Photoshop CS6 and Photoshop CC are installed in two different folders, each with their own scripts. But at least on Windows both versions of Photoshop use the same version of "Export Layers to Files". Version 1.0.0.16. and those edits work for me.

So my only suggestion is to ask if you are sure you are editing the script used by Photoshop CC?

Inspiring
July 3, 2013

Welcome to the forum.

You would maybe be better served asking in the PhotoShop Scripting Forum

http://forums.adobe.com/community/photoshop/photoshop_scripting

Or even here:

http://www.ps-scripts.com/bb/index.php

In general, I think there were changes across the board with the scripting in CC that broke things in PS, IL, ID, etc. I have seen it in both the Illustrator and InDesign scripting forums, previous scripts no longer work as before or are broken, features removed, etc. Sad but true.

Jeffrey_A_Wright
Community Manager
Community Manager
July 4, 2013

Moving this discussion to the Photoshop Scripting forum.  Thanks for the suggestion W_J_T I was getting ready to move the discussion to the Photoshop General Discussion forum instead.