• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
3

Remove number sequence when "Export layers to files" in CC

Community Beginner ,
Oct 05, 2017 Oct 05, 2017

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?

Screen Shot 2017-10-05 at 6.55.42 PM.png

 

Or if not possible, is there any recommendations on advance 'file renaming tools' like GREP in InDesign?

TOPICS
Actions and scripting

Views

28.8K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Beginner , Dec 08, 2017 Dec 08, 2017

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.

Photoshop-disable-layers-to-comps-sequence.jpg

Votes

Translate

Translate
Adobe
LEGEND ,
Oct 05, 2017 Oct 05, 2017

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 05, 2017 Oct 05, 2017

Copy link to clipboard

Copied

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Dec 08, 2017 Dec 08, 2017

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.

Photoshop-disable-layers-to-comps-sequence.jpg

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 07, 2020 May 07, 2020

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

Screen Shot 2020-05-07 at 5.47.40 PM.png

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Sep 28, 2021 Sep 28, 2021

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?

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 28, 2021 Sep 28, 2021

Copy link to clipboard

Copied

You can (should) edit that file and save it back.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jul 30, 2018 Jul 30, 2018

Copy link to clipboard

Copied

Thank you!

Randy

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
May 07, 2024 May 07, 2024

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
May 09, 2024 May 09, 2024

Copy link to clipboard

Copied

LATEST

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines