Skip to main content
Participant
May 5, 2024
Open for Voting

Add Variables [FILE_NAME] to export layers to Files

  • May 5, 2024
  • 6 replies
  • 750 views

In order to use the command EXPORT / LAYERS to FILES in a script (and Automation). It would be interesting to add a variable [FILE_NAME] to the file name prefix to process this command in batch.

 

Thus each LAYER exported as a FILE will have as a PREFIX the name of the file from which it comes. For batch processing of multiple PSD FILES.

 

6 replies

willcampbell7
Legend
May 10, 2024

@jacques74 

 

Thank you for the contribution. I really appreciate it. Keeps me writing new scripts.

 

William Campbell
jacques74Author
Participant
May 10, 2024

Hi. I (roymodus) just purchased your script. It works perfectly. This is exactly what I'm looking for. THANKS. regards

Stephen Marsh
Community Expert
Community Expert
May 10, 2024
willcampbell7
Legend
May 9, 2024

I too found the script that comes with Photoshop to be less that what I desired. So I wrote my own. This script includes the file's original name, and you can easily edit the code to do it any other way you prefer:

https://www.marspremedia.com/software/photoshop/save-layers

 

William Campbell
Stephen Marsh
Community Expert
Community Expert
May 5, 2024

P.S. If you need the ability to batch save the layers of multiple files today, then there are already numerous custom scripts that can be recorded into a batch action.

Stephen Marsh
Community Expert
Community Expert
May 5, 2024

@jacques74

 

Export layers to files is a script, so it can be edited, however, the default Adobe scripts are long and complex.

 

The script is designed to work with an interface on the active document, not for multiple docs/batches.

 

The selected parameters in the script interface can be recorded into an action (a script has to be coded to specifically allow this)... But this isn't suitable for the Batch command.

 

This would likely require a major rewrite of the script as the current ExtendScript based code isn't intended for batching.

 

I am hoping that Adobe rewrites all of the default scripts in UXP as either a stand-alone script or perhaps as a persistent floating panel plugin. Having the ability to select the active document or a batch would be a good thing for these legacy scripts (Layers to Files, Artboards to Files, Layer Comps to Files etc).

 

I have added my vote!