Categories
Tips and Guides

Part- 1 Illustrator Scripting opening files in path selected

Below is the script to loop through opened files as user select the folder

var dir = Folder.selectDialog(“Select location of files?”);
var files = dir.getFiles(“*.ai”);
// .eps IS THE EXTENSION OF FILES TO READ
dir=dir.fsName;

Below is the script a that can be used to loop through files from the selected folder above

for(var f = 0; f < files.length; f++){
var doc = app.open(files[f]);
//PROCESS YOUR FILE HERE AS DOC VARIABLE CONTAINS DOCUMENT

Closing file. which is open in the start of the loop

doc.close(SaveOptions.DONOTSAVECHANGES);
}

FOR ANY EXTENSION / SCRIPT / PLUGIN WORK DON’T HESITATE TO LEAVE ME A MESSAGE OR CONTACT ME at mr.bunt@gmail.com