Welcome to Photoshop Gurus Forum!

Join us now to get access to all our features. Once registered and logged in, you will be able to view and download attachments, create topics, post replies to existing threads, get your own private messenger and more.

+ Reply to Thread
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 14
  1. #1
    Junior Member
    Join Date
    Nov 2009
    Posts
    13

    Smile Any way to automate duplicating all layers to new documents?

    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!

  2. #2
    Member
    Join Date
    May 2009
    Location
    Bradford,UK
    Posts
    47
    I wonder if you have tried:-
    File - Scripts - Export Layers to Files...

  3. #3
    Junior Member
    Join Date
    Nov 2009
    Posts
    13
    Quote Originally Posted by Paul MR View Post
    I wonder if you have tried:-
    File - Scripts - Export Layers to Files...
    THAT is cool!

    I'll have to play with it to see if I can incorporate it into other actions to create what I'm looking for. Thanks!

  4. #4
    Junior Member
    Join Date
    Nov 2009
    Posts
    13
    How can I remove the "_0001" "_0002" etc that is placed in front of the output files?

  5. #5
    Member
    Join Date
    May 2009
    Location
    Bradford,UK
    Posts
    47
    You could comment out line 793
    fileNameBody += "_" + zeroSuppress(i, 4);
    just put // in front.

  6. #6
    Junior Member
    Join Date
    Nov 2009
    Posts
    13
    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 by darthsmozers; 11-19-2009 at 09:10 AM.

  7. #7
    Junior Member
    Join Date
    Nov 2009
    Posts
    13
    Quote Originally Posted by Paul MR View Post
    You could comment out line 793
    fileNameBody += "_" + zeroSuppress(i, 4);
    just put // in front.
    Wow, you're awesome! (I have very little programming experience...)

  8. #8
    Member
    Join Date
    May 2009
    Location
    Bradford,UK
    Posts
    47
    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?

  9. #9
    Junior Member
    Join Date
    Nov 2009
    Posts
    13
    Quote Originally Posted by Paul MR View Post
    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? :-)

  10. #10
    Member
    Join Date
    May 2009
    Location
    Bradford,UK
    Posts
    47
    Sorry I even confused myself the new two lines of code should be placed just before..
    var fileNameBody = fileNamePrefix; (Line 792)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts