Hi guys
I'm very new to javascript, and general Photoshop scripting. My script is coming on well, but I struggle working with files and folders. It's a lack of basic javascript knowledge, which I need to work on. Right now, I'm trying to expand the image open part of my script, so that it opens images regardless of whether they are in a subfolder or not.
You can see my input folder (C:/Input). I want to be able to throw files in there, some in folders, some not. Out of interest, my outputs will be combined into one output folder... that bit is fine.
var inFolder = new Folder("C:/Input")
if(inFolder != null){
var fileList = inFolder.getFiles(/\.(jpg|tif|psd|bmp|gif|png|)$/i);
}
for(var a = 0 ;a < fileList.length; a++)
{
var docRef = open(fileList[a]);
//do things here
}
Is there an easy way of expanding this to include files in subfolders? All advice greatly appreciated.
Thanks
David