What's new
Photoshop Gurus Forum

Welcome to Photoshop Gurus forum. Register a free account today to become a member! It's completely free. Once signed in, you'll enjoy an ad-free experience and be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Batch Automation Any way to automate duplicating all layers to new documents?


darthsmozers

Member
Messages
13
Likes
0
I have a layer list of about 15 layers. I currently have to right-click, duplicate new, and type the name to duplicate each layer out to their own document. I have an action to automatically save the duplicated file to a specific folder and close it, but I'd like to roll it all into one or two steps.

For example:
Click and action that runs through the layer list, duplicating the first layer out, saving/closing it, then back to the 2nd layer, save/close, 3rd layer save/close, etc.

or

simply runs through the list duplicating out each layer to their own files, and then i can hit each one manually with the save/close action i already have.

Any thoughts on how to accomplish this?

Thanks!
 
You could comment out line 793
fileNameBody += "_" + zeroSuppress(i, 4);
just put // in front.
 
Also, I need each layer to be converted to Bitmap (Image>Mode>Bitmap)before being saved off. I wonder if there's any way to implement this along with the Export Layers to Files script?
 
Last edited:
Add these two lines after line 791
Code:
 duppedDocumentTmp.changeMode(ChangeMode.GRAYSCALE);
duppedDocumentTmp.changeMode(ChangeMode.BITMAP,new BitmapConversionOptions);
Before Line 792
Code:
var fileNameBody = fileNamePrefix;

You might only be able to save as a psd though?
 
Add these two lines after line 791
Code:
 duppedDocumentTmp.changeMode(ChangeMode.GRAYSCALE);
duppedDocumentTmp.changeMode(ChangeMode.BITMAP,new BitmapConversionOptions);
Before Line 792
Code:
var fileNameBody = fileNamePrefix;

You might only be able to save as a psd though?

I added those two lines after 791. They become lines 792-793. When adding that last line of code you mentioned before line 792. Is that the old 792 or the new one? :)
 
Sorry I even confused myself the new two lines of code should be placed just before..
var fileNameBody = fileNamePrefix; (Line 792)
 
Sorry I even confused myself the new two lines of code should be placed just before..
var fileNameBody = fileNamePrefix; (Line 792)

haha no problem. Thanks I'll give it a go. I'll probably be reporting back here with more questions on Monday. Thank you for all of your help!
 
OK I took out the grayscale, and left only the Bitmap. I want the bitmap to incorporate the Bitmap setting of 1200dpi output resolution, and Method = 50% Threshold. Any advice?
 
Replace those last two lines of code with this, please don't take out the grayscale bit as if the document isn't grayscale you can't go straight to Bitmap.

Code:
if(duppedDocumentTmp.mode != DocumentMode.GRAYSCALE){
	duppedDocumentTmp.changeMode(ChangeMode.GRAYSCALE);
}
var bitmapOptions = new BitmapConversionOptions;
bitmapOptions.resolution=1200;
bitmapOptions.method=BitmapConversionType.HALFTHRESHOLD;
duppedDocumentTmp.changeMode(ChangeMode.BITMAP,bitmapOptions);
 
Last edited:
This now gives me exactly what I was looking for. All thanks to you. I think I'll learn a bit from this as well. Thank you!
 
Forex is a market that is easily affected by many things both news and political dis put and other. So, non one will claim that forex automat will bring profit when that market is trade downside. or will predict when the market will trade upward.
 

Back
Top