9 Replies Latest reply on Nov 28, 2013 11:06 PM by c.pfaffenbichler

    Saving multiple images at one time to a different folder

    Snaptastic

      Is there a script available that can save multiple pictures upon completion of editing to a different output folder of my choice other than the source folder all at the same time? Example I open 11 different photos from source folder x, I edit said 11 pictures and now want to save all 11 pictures to output folder xy all at the same time.  What I want to prevent is having to click save as select new folder for each and every picture I have open.

        • 1. Re: Saving multiple images at one time to a different folder
          Michael L Hale Level 5

          What version of Photoshop are you using? Newer versions have a preference for 'Save as to original folder'. With that preference off you will not have to keep choosing the new folder.

          • 2. Re: Saving multiple images at one time to a different folder
            Snaptastic Level 1

            I'm using Photoshop CS5. What I want is to be able to close all open pictures and save them all at once to a folder of my choosing. I don't want to save to the original source folder as I want the original to be untouched. Does this make sense.

            • 3. Re: Saving multiple images at one time to a different folder
              c.pfaffenbichler Level 9

              Does this help?

              /* save open documents to location */

              /* 2013, use it at your own risk */

              if (app.documents.length > 0) {

                        var myDocument = app.activeDocument;

              /* create dialog */

                        var dlg = new Window('dialog', "select files", [500,300,830,565]);

              /*create list of open files, thanks to paul r */

              dlg.fileList = dlg.add('listbox', [15,15,315,220], 'field', {multiselect: true});

              /* populate the list with the open files’ names */

              for (var o = 0; o < app.documents.length; o++) {

                        dlg.fileList.add ("item", app.documents[o].name);

                        dlg.fileList.items[o].selected = true

                        };

              /* buttons for ok, and cancel */

                        dlg.buildBtn = dlg.add('button', [13,230,160,255], 'OK', {name:'ok'});

                        dlg.cancelBtn = dlg.add('button', [170,230,317,255], 'Cancel', {name:'cancel'});

                        dlg.center();

              /* show the window */

                        var myReturn = dlg.show ();

                        if (myReturn == true) {

              /* get the selcted ones */

                        var theSelected = new Array;

                        for (var p = 0; p < dlg.fileList.items.length; p++) {

                                  if (dlg.fileList.items[p].selected == true) {

                                            theSelected = theSelected.concat(app.documents[p])

                                            }

                                  };

              /* folder selection */

                        var theFolder = Folder.selectDialog("select a folder");

                        if (theFolder) {

                                  var thePath = theFolder.fullName;

                                  psdOpts = new PhotoshopSaveOptions();

                                  psdOpts.embedColorProfile = true;

                                  psdOpts.alphaChannels = true;

                                  psdOpts.layers = true;

                                  psdOpts.spotColors = true;

              /* save the psds */

                                  for (var m = 0; m < theSelected.length; m++) {

                                            app.activeDocument = theSelected[m];

                                            var theDoc = app.activeDocument;

                                            try {var basename = theDoc.name.match(/(.*)\.[^\.]+$/)[1]}

                                            catch (e) {var basename = theDoc.name};

                                            if (File(thePath+'/'+basename+".psd").exists == false) {

                                                      theDoc.saveAs((new File(thePath+'/'+basename+".psd")),psdOpts,false);

                theDoc.close()

                                                      }

                                            else {alert ("a file named "+basename+".psd"+" already exists in that folder")}

                                            }

                                  }

                        }

              };

              • 4. Re: Saving multiple images at one time to a different folder
                Snaptastic Level 1

                c.pfaffenbichler

                 

                Thank you very much for your response, but I have to be honest with you and say wow that blew my mind and I have no idea what it does or how to incorporate it as I am still learning things. But thank you very much

                • 5. Re: Saving multiple images at one time to a different folder
                  Snaptastic Level 1

                  In case it's important I'm running PS on a Mac

                  • 6. Re: Saving multiple images at one time to a different folder
                    c.pfaffenbichler Level 9

                    If you want to give it a try paste the text into a new file in ExtendScript Toolkit (part of Photoshop’s installation, Applications/Utilities/Adobe Utilities/ExtendScript Toolkit … and save it as a jsx-file into Photoshop’s Presets/Scripts-folder.

                    After restarting Photoshop the Script should be available under File > Scripts and can be assigned a Keyboard Shortcut directly, recorded into an Action, be used in a Configurator-Panel or started from ExtendScript Toolkit directly.

                    • 7. Re: Saving multiple images at one time to a different folder
                      Snaptastic Level 1

                      Thank you very much. I tried this and I think it may suit my purpose. I can not seem to get it to appear under scripts I restarted P'S still nothing. I saved to Adobe Scripts file. When run the script it will not allow me to search for for a destination that i want to create new folder. Also is there a way to make it appear under extensions with a GUY for easy access. Appreciate your help.

                      • 9. Re: Saving multiple images at one time to a different folder
                        c.pfaffenbichler Level 9

                        The proper location for the jsx file is the Presets/Scripts folder right beside the app.