Script to open 2 versions of the same file a JPEG and a TIFF - nrun action in a batch format

I have 2 folders of images.  One is a folder of JPEG files that have paths created for the image.  The second folder is an identical image, except that it's a TIFF file with no path.

I created an action that takes the path of the installation on the TIFF and JPEG and does work for me.  What I can't understand is how this batch?

I think that I would need a script to open the first image for each folder action and then go to the next image in each folder and so on.

Any help would be so wonderful.

If you know a script or can point me in a direction that would be great!

Sorry about that, I had missed a point out of this line, please try this now.

#target photoshop
main();
function main(){
var jpgFolder = Folder.selectDialog("Please select the jpg folder");
if( jpgFolder == null) return;
var tifFolder = Folder.selectDialog("Please select the tif folder");
if( tifFolder == null) return;
var fileList = jpgFolder.getFiles("*.jpg");
for(var a in fileList){
    var JPG = fileList[a];
    var TIF = File( tifFolder + "/" + fileList[a].name.toString().replace(/jpg$/i,'tif'));
    if(!TIF.exists) continue;
    open(JPG);
    open(TIF);
    //needs amending with your action name and actionset
    doAction("ActionName","ActionSet");
    }
};

Tags: Photoshop

Similar Questions

Maybe you are looking for