+ Reply to Thread
Page 1 of 2 12 LastLast
Results 1 to 10 of 16
  1. #1
    Junior Member
    Join Date
    Nov 2009
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts

    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
    The Script Master
    Join Date
    May 2009
    Location
    Bradford,UK
    Posts
    185
    Thanks
    0
    Thanked 26 Times in 24 Posts
    I wonder if you have tried:-
    File - Scripts - Export Layers to Files...

  3. #3
    Junior Member
    Join Date
    Nov 2009
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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
    Thanks
    0
    Thanked 0 Times in 0 Posts
    How can I remove the "_0001" "_0002" etc that is placed in front of the output files?

  5. #5
    The Script Master
    Join Date
    May 2009
    Location
    Bradford,UK
    Posts
    185
    Thanks
    0
    Thanked 26 Times in 24 Posts
    You could comment out line 793
    fileNameBody += "_" + zeroSuppress(i, 4);
    just put // in front.

  6. #6
    Junior Member
    Join Date
    Nov 2009
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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 10:10 AM.

  7. #7
    Junior Member
    Join Date
    Nov 2009
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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
    The Script Master
    Join Date
    May 2009
    Location
    Bradford,UK
    Posts
    185
    Thanks
    0
    Thanked 26 Times in 24 Posts
    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
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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
    The Script Master
    Join Date
    May 2009
    Location
    Bradford,UK
    Posts
    185
    Thanks
    0
    Thanked 26 Times in 24 Posts
    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
Powered by vBulletin® Version 4.1.9
Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.
Content Relevant URLs by vBSEO 3.6.0
Copyright 2011 Photoshop Gurus Forum. All rights reserved.
All times are GMT -5. The time now is 08:10 AM.