// JavaScript Document // find the folder of original images alert("Browse for the folder containing your original images."); var imgStart = fw.browseForFolderURL(); // find the folder for saved images alert("Browse for the folder to save your updated images"); var imgSave = fw.browseForFolderURL(); // create an array of the files to be worked on var fileList = new Array; fileList = Files.enumFiles(imgStart); // create loop to run through files in folder for (var i = 0; i < fileList.length; i++) { // open image fw.openDocument(fileList[i]); // add drop shadow fw.getDocumentDOM().applyEffects({ category:"Untitled", effects:[ { EffectIsVisible:true, EffectMoaID:"{a7944db8-6ce2-11d1-8c76000502701850}", ShadowAngle:315, ShadowBlur:4, ShadowColor:"#000000a5", ShadowDistance:9, ShadowType:0, category:"Shadow and Glow", name:"Drop Shadow" } ], name:"Untitled" }); // increase size of canvas and set canvas colour fw.getDocumentDOM().setDocumentCanvasSizeToDocumentExtents(true); fw.getDocumentDOM().setDocumentCanvasColor("#FFFFFF"); // export image as jpg var fileName = ("ds_" + Files.getFilename(fileList[i])); var expName = Files.makePathFromDirAndFile(imgSave,fileName); fw.exportDocumentAs(null,expName,null); // close image without saving fw.getDocumentDOM().close(false) }