Save As script for archiving

Viewing 8 reply threads
  • Author
    Posts
    • #54381
      Aaron
      Participant

      I'd like to do a Save As on a whole lot of InDesign documents before archiving them. Doing this saves a heck of a lot of space – sometimes from 100MB down to 5MB on a single file.

      Currently I can open them all up, click to ignore missing links, click to ignore missing fonts (over and over), then with the keyboard shortcuts press Save As, Enter, Replace (Cmd-R) and Close for each. Not bad, but does anyone have a script to do this? Would be great to have it automated.

      Thanks in advance.

    • #54401

      Hi Aaron,

      I wrote such a script, you can download it from here here.

      It opens all InDesign documents in selected folder and resaves them into 'Resaved Files' subfolder, which is created in the selected folder. It ignores any errors while opening files: missing fonts, missing/modified images, etc.

      Regards,
      Kasyan

    • #54402
      Aaron
      Participant

      Oh Kasyan, how incredibly kind of you! I'll try it at work tomorrow.

      Damn, just realized, I really need it to save over the old one. Just as if the document was already open and you went, Save-as, Enter, Replace. The reason for this is that the Indesign files have been found via a spotlight search – it would take a long time to find each original and replace it with the new 'Saved-As' file.

      Thanks a bunch though – what a generous community!

    • #54403

      At first I tried to make the script to overwrite original files but encountered a problem: the files remained open and invisible in InDesign. I had no time to solve this problem yesterday so, as a workaround I, decided to write them into another folder.

      On the other hand, you have original files intact in case something goes wrong — e.g. if your computer crashes while the script is working. And it doesn't take much time to select all resaved files and move them to the folder with original files to overwrite them.

      Anyway if you need the script to overwrite the original files, I can give it a try when time permits. Let me know.

      Kasyan

    • #54406
      Aaron
      Participant

      No worries — thanks for your help to date.

      Actually all I really need is a macro/action that simply sends the four commands Shift-Cmd-S, Enter, Cmd-R, Cmd-W that I can run over and over until all the windows are closed. I can probably figure out how to do that myself sometime.

      Thanks again.

    • #54407

      … all I really need is a macro/action that simply sends the four commands Shift-Cmd-S, Enter, Cmd-R, Cmd-W that I can run over and over until all the windows are closed. I can probably figure out how to do that myself sometime.

      InDesign doesn't support macros and/or actions. And boy! is that high on my wish-list! Exactly for doing stuff like this. Now it needs a script.

      The scripting language does not 'record' actions — it works the other way around, you have to supply the commands that are performed inside ID when you press 'Shift+Cmd+S'. So you would send a 'save as', then a 'close' command to the active window, repeating until no windows are left.

      What happens when you have an untitled document? In the javascript below, I check for that and don't do nuffin' with these.

      list = app.documents.everyItem().getElements();
      while (list.length > 0)
      {
      doc = list.pop();
      if (doc.saved)
      {
      doc.save (doc.fullName,false,undefined,true);
      doc.close();
      }
      }
    • #54413

      May be Quickeys come in handy to you then.

    • #54428

      I remade the script to save over old files: https://kasyan.ho.com.ua/downlo…..Files2.zip

      Thanks Jongware for the tip!

      Kasyan

    • #102775

      Can anyone provide these “save as” scripts (or point to similar scripts)? The links supplied in the answers no longer work.

      Thanks

Viewing 8 reply threads
  • You must be logged in to reply to this topic.
>