Skip to main content
Known Participant
April 28, 2023
Question

Batch Save and Close all open windows, INCLUDING the hit enter to save NEW documents

  • April 28, 2023
  • 1 reply
  • 1074 views

I have 111 NEW open documents in Indesign and I want to save and close them all in the same location, but since these are new files, after each one you have to hit enter to save in that location. Is there a script to save as new and then close in a batch?

 

 

**cmnd + opt + shift + S/W doesnt work because these are New files, that function works if its ReSaving documents

 

This topic has been closed for replies.

1 reply

brian_p_dts
Community Expert
Community Expert
April 28, 2023

The files need a name, but something like this should work. You can change adoc to whatever filename you want to prepend.

 

 

var docs = app.documents;
var fol = Folder.selectDialog("Choose the folder to save to");
var i = docs.length;
while(i--) {
    docs[i].saveAs(File(fol + "/adoc_" + i));
    docs[i].close(SaveOptions.NO);
}

 

 

Known Participant
April 28, 2023

Thank you for the response, do you possibly have this in script file I can drop import into ID?