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

Shrink long-generated file names during Export Layers to Files

Community Beginner ,
Mar 11, 2019 Mar 11, 2019

We do a lot of batch exporting of Layers to files. The issue we are having is that the length of the file names attached to the baseline file name we create is pretty long, and we spend time then having to remove the extra information.

Example:

1. IWD-Office- // what we set the baseline file name to be in the modal:

111.png

2. IWD-Office-x // x being a number is what we would like the export to look like.. ex: IWD-Office-1 ...


3. IWD-Office-_0000_Layer-2.png // instead we get this and then have to manually remove that info.

Is there a way to have it export in the format in item 2?

I've seen solutions on Stack (adobe photoshop - CS5 export layers as files with NO number sequence - Graphic Design Stack Exchange) where we have to hack a script file in the PS core, but we'd really like to avoid doing this.

Thanks,

TOPICS
Actions and scripting
1.4K
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
Adobe
Community Expert ,
Mar 11, 2019 Mar 11, 2019

You should to do that with any Photoshop version export layers to files script.  Remove the sequencing numbering code. And save ii with a different script name.  So you can use it with and Photoshop version.

The line numbering and code will be different.  More like line 2193, 2197 and 2229

Warning Layer name need not be unique removing  the sequence could easily produce dupe file names. You mat want to number your layer names first.

JJMack
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 ,
Mar 11, 2019 Mar 11, 2019

...we have to hack a script file in the PS core, but we'd really like to avoid doing this.

So you have to either hack a copy of the script, or use something like Bridge’s Batch Rename tool to bulk rename the files after the script as a second step:

regex.png

There are of course multiple equivalent Find strings:

(^.+-)(?:_.+)

(^\w+-\w+-)(?:.+)

(IWD-Office-)(.+)

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 ,
Mar 12, 2019 Mar 12, 2019

We have been using a similar utility called Bulk Rename Utility to do the post-renaming. But I think it would really help if PS had the native option set of Bridge built into the option modal for batch export.

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 ,
Mar 12, 2019 Mar 12, 2019

Bridge does not do the export Photoshop does and how would you want files named. There need to be something to generate unique name. If there are duplicate layer names do you want a suffix appended to the  filename like Image processor generates.  You can modify export layer to files remove the serial sequences and add the unique name code like Image Process has in it to export layers to files.

JJMack
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 ,
Mar 12, 2019 Mar 12, 2019

I meant that instead of Bridge we use another tool to update the file names of the files already created. As far as rules applied to duplicates; I would just use the same exact rules that Bridge uses; I don't mind if I had to change one file name with longer suffix because of a duplicate already exists or add the rule inside the process [like if duplicates found add xxx]. So, per my earlier note,  essentially embed the file-renaming rule-set of Bridge (Bridge's modal for batch file-renaming is pretty straight forward) into Photoshop (including countermeasures for duplicate files). At the end of the day, this would just enhance Photoshop's currently existing Layers-to-Files modal with a more detailed file-naming rule set.

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 ,
Mar 12, 2019 Mar 12, 2019
LATEST

You could submit an idea to Adobe on their feedback site.  I do not think much would be done though.  Look at how much turmoil  the last Transform change cause.  Make an inconsistent change to make thing different for new users and upset loyal users work-flow in the process. Hopefully Adobe learned that Changes that are not well reviewed are poor. Hers is where you should submit your wish. Photoshop Family Customer Community

JJMack
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