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

Export layers to files - How to set 'File Name Prefix' empty by default?

Explorer ,
Dec 08, 2023 Dec 08, 2023

When using 'Export layers to files' I would realy like 'File Name Prefix' to be empty by defaut.
Can anyone please tell me what to change in the script to have this box NOT containing the current file name by default?

 

EDIT: My first post was not clear. I also wanted to get rid of the leading sequential numbers.
Thank you!

TOPICS
Actions and scripting
2.7K
Translate
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 2 Correct answers

Participant , Dec 08, 2023 Dec 08, 2023

Change the line 579 beginning with 

dlgMain.etFileNamePrefix = ...

to this:

dlgMain.etFileNamePrefix = dlgMain.grpTopLeft.add("edittext", undefined, "");

 

Translate
Community Expert , Jan 03, 2024 Jan 03, 2024

@TrimMark 

 

Just to be crystal clear, are you referring to the sequential numbers that are added, even if the prefix field is left blank:

 

Layer Names:

Layer 0

Layer 1

 

Exported File Names:

_0000_Layer 0.jpg

_0001_Layer 1.jpg

 

They are there as a safety to stop overwriting an existing file if there are multiple layers with the same name. I'm sure that the script could be modified, these Adobe default scripts are very complicated.

 

EDIT: If all you want is the layer name, then try changing t

...
Translate
Adobe
Participant ,
Dec 08, 2023 Dec 08, 2023

Change the line 579 beginning with 

dlgMain.etFileNamePrefix = ...

to this:

dlgMain.etFileNamePrefix = dlgMain.grpTopLeft.add("edittext", undefined, "");

 

____________________
Robotic Process Automation in Desktop Publishing (Book): https://doi.org/10.1007/978-3-658-39375-5
Translate
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 ,
Dec 08, 2023 Dec 08, 2023

Thank you for your help.
Now there is a other prefix that I cant turn off: '_000x' 

Translate
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 ,
Jan 03, 2024 Jan 03, 2024

Annyone, please?
It's annoying to have to rename the exported files.

I want the exported files to have the name of the layer, no prefixes.

Translate
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 ,
Jan 03, 2024 Jan 03, 2024

@TrimMark 

 

Just to be crystal clear, are you referring to the sequential numbers that are added, even if the prefix field is left blank:

 

Layer Names:

Layer 0

Layer 1

 

Exported File Names:

_0000_Layer 0.jpg

_0001_Layer 1.jpg

 

They are there as a safety to stop overwriting an existing file if there are multiple layers with the same name. I'm sure that the script could be modified, these Adobe default scripts are very complicated.

 

EDIT: If all you want is the layer name, then try changing the following as per the annotated screenshot and restart Photoshop:

 

2024-01-03_23-02-54.pngexpand image

 

This has no effect on the GUI, all it does is change the output filename.

 

Translate
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 ,
Jun 17, 2024 Jun 17, 2024

Hi @Stephen Marsh hi thanks for this info, I'm using Photoshop beta Version: 25.11.0 20240613.m.2665 411f25b x64, as it has the new generative fill features, but I can't find that section, would you know what I need to do in that version please?

Translate
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 ,
Jun 17, 2024 Jun 17, 2024
LATEST
quote

Hi Stephen Marsh hi thanks for this info, I'm using Photoshop beta Version: 25.11.0 20240613.m.2665 411f25b x64, as it has the new generative fill features, but I can't find that section, would you know what I need to do in that version please?


By JD74

 

I don't use the beta.

 

Are you on Mac or Win? 

 

There should be 2,645 lines of code for "Export Layers to Files.jsx" that ships with the public 2024 version, with the last two lines blank @@@BUILDINFO@@@ Export Layers To Files.jsx 1.0.0.22

.

Translate
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