-
1. Re: Is this possible?
[Jongware] Apr 27, 2010 2:14 AM (in response to Anna Nmty)Absolutely possible.
I would advise to not start with a complete script, but try each separate part one at a time:
1. Getting a list of files
2. Update one link in an already open file
3. Export an opened file to PDF
4. Close an opened file :-)
If you have each of the parts working, copy them as separate functions into a single script, run this, sit back & have a well-deserved coffee.
Let me get you started with (1). That's as simple as this -- remember, the processFile function should only be used if you know how to process one file; don't experiment with your entire set until you are (fairly) confident the rest works.
var filenames = [ ]; var folder = Folder("//c/Users/YourName/Documents"); folderContents = folder.getFiles("*.indd"); for (i=0; i<folderContents.length; i++) { filenames.push (folderContents[i]+"\n"); // processFile(folderContents[i])); } alert (filenames.join("\r")); // Not used yet: function processFile (name) { var currentFile = app.open (name); // .. currentFile.close (); } -
2. Re: Is this possible?
Anna Nmty Apr 27, 2010 7:47 AM (in response to [Jongware])Thank you for the hope and the start!
I am planning to spend my lunches this week going trying to find ways to automate tasks and this task is top of my list as the deadline rapidly approaches.


