Save All script for Photoshop

Photoshop, Illustrator, Tutorials & Resources & any other stuff flat and creative (except pancakes)
Post Reply
Site Admin
Posts: 609
Joined: January 5th, 2006, 2:21 pm
Location: Next Rock after the one Cow's at

Save All script for Photoshop

Post by morphim » November 9th, 2008, 4:11 pm

Hello. I'm not going to make my usual excuses about my lack of posts. Just sorry :oops: :cry:

Anyway. Here's a thing that I found and used and it's great for batch saving (in this case as jpegs)

I found it HERE on . Hats off to him.

Here's a copy (in case his disappears?)

Code: Select all

var tempFolder = new Folder ("C:/Your_Temporary_Folder")


var DL = documents.length;


   activeDocument = documents[a-1];

   var AD=activeDocument;

   var imgName=;

   imgName = imgName.substr(0, imgName.length -4);


   saveFile = new File("C:/Your_Temporary_Folder/"+imgName+".jpg");

   saveOptions = new JPEGSaveOptions();

   saveOptions.embedColorProfile = true;

   saveOptions.formatOptions = FormatOptions.STANDARDBASELINE;

   saveOptions.matte = MatteType.NONE;

   saveOptions.quality = 12;

   AD.saveAs(saveFile, saveOptions, true,Extension.LOWERCASE);

Save it with a .js extension (in notepad or the like - I put it in the 'sripts' folder of PS) and open it on Photoshop (Menu File > Scripts). This example saves JPEG files with level 12 ( can be set from 0 to 12)compression; you might want to change the output quality or the format itself.
This code was written by mlk (mlkdesign -at with a few changes by me (Keoshi).
A small word of warning - when you access the script it will act IMMEDIATELY on all files in the current PS workspace, so make sure what's there is what you want. Not that it's too much of a hassle but you might save several files you didn't want as it gives not prompts.

Nice :) HTH
It's always a sunny day above the clouds : )

Post Reply