This content has been marked as final.
Show 1 reply
-
1. Re: Need help on deleting after exporting to IDML
Green4ever Sep 16, 2013 12:02 AM (in response to indegn5)I hope this is what you expected.
You can try the following code:
var mySourceFolder = Folder("Desktop/GENERAL_CS6-IDML/IN_CS6"); var myOutFolder = Folder("Desktop/Completed"); //var Indd_files = get_Files(mySourceFolder,[], ".indd"); var Indd_files = mySourceFolder.getFiles (/\.indd|\.INDD/i); //var Indd_files = get_Files(mySourceFolder,[], ".indd"); if(Indd_files.length>0) { for(var w=0;w<Indd_files.length;w++) { try{ app.scriptPreferences.userInteractionLevel = UserInteractionLevels.neverInteract; var myFile = File(Indd_files[w]); myDoc = app.open(myFile); app.scriptPreferences.userInteractionLevel = UserInteractionLevels.neverInteract; var myDocNam = stripExt((Indd_files[w].name).replace(/%20/g," "))+"idml"; myDoc.exportFile(ExportFormat.INDESIGN_MARKUP, (File(myOutFolder+"/"+myDocNam))); app.activeDocument.close(SaveOptions.no); myFile.remove(); }catch(E){} } }---------------
Green4ever

