0 Replies Latest reply on Mar 8, 2009 9:38 PM by hm_arul

    Relink book file

    hm_arul
      Hi scripters

      Here I am updating book file.contents from one folder to another folder. Below is my code I used to update the book file. While I am executing this script It's processing for sometime and finally closes the Indesign application.

      var new_folder = Folder.selectDialog("Please select a folder");

      bb = app.books[0].bookContents;
      for (i = 0; i < bb.length; i++)
      {
      chname= File(bb[i].fullName).name;
      mynewfile = File(new_folder + "/" + chname);
      if (mynewfile.exists) {
      bb[i].replace (File (mynewfile));
      }
      }

      The error shown below

      ---------------------------
      Adobe InDesign
      ---------------------------
      Adobe InDesign is shutting down. A serious error was detected. Please restart InDesign to recover work in any unsaved InDesign documents.
      ---------------------------
      OK
      ---------------------------

      Please advice me where I am mistaken?

      thanks in advance

      regards
      a r u l
      vpublish.net