Tell me more ×
Graphic Design Stack Exchange is a question and answer site for professional graphic designers and non-designers trying to do their own graphic design. It's 100% free, no registration required.

I have many PSDs that each contain 2+ layers that I need to export as layers. For a single PSD I can use:

File>Scripts>Export Layers To Files ...

However if I use this script (in a droplet) I have to hard-code the destination folder and File Name Prefix. This is no good as many of the PSDs contain layers with the same names, so they would overwrite each other and I need each file to be prefixed by the PSD name. So a layer called text_1 from a PSD called doc_1 would be called doc_1_text_1, and a layer called text_1 from a PSD called doc_2 would be called doc_2_text_1 or something similar.

Is there any way I can do this? I'm happy to hard-code the destination folder, but I need the script to use whatever the name of the PSD is for the prefix.

share|improve this question

1 Answer

I hacked together a jsx script to do it based on the Export Layers to Files script. It only supports png24 export and has no dialogue. It assumes you want to trim the layer, and the path to the folder you want to export to is hard-coded into the script itself. To set the folder change this line (at the top of the script:

var targetExportDir = "/Users/you/path/to/the/folder";

It works in an action and droplet too.

https://dl.dropbox.com/u/316978/xl2.jsx

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.