4 Replies Latest reply on Aug 1, 2015 6:29 AM by sreekarthik.k@gmail.com

    Change links for multiple InDesign files

    jonathanlarson Level 1

      Hello Folks,


      Here's the situation. We are changing our organizations file structure in a dramatic way. We are removing mapped drives, eg. H:\, and replacing them with shortcuts that will reside in their Windows Explorer that link to \\fs\marketing for example.


      We have hundreds, if not thousands, of InDesign files across our organization that are probably not properly packaged when they were done with them. Is there a way to either update the links all at once using a script or being able to run a script when the user opens the InDesign file to map to the new location. It won't be a dramatic change, it'll be something simple like:


      H:\DEPT\marketing\project\image.jpg  will change to   \\fs1\marketing\project\image.jpg


      I'm not an InDesign user, just the IT person in charge of getting ready for this change which is why I'm asking here. The link above is only an example of the link, I don't know what the actual links would be. I found a few scripts on here for changing links, but I don't think they are designed to perform a change like this.

      We are a Windows only organization. All end users are running Windows 7 64 bit.




      Any help/suggestions/ideas would be greatly helpful and appreciated!

        • 1. Re: Change links for multiple InDesign files
          Level 1

          Try this


          var cur_doc=app.activeDocument;

          var myf=Folder.selectDialog("Choose folder for Art File");




          var indFils=myf.getFiles("*.indd");




          function linkProc(cur_doc)


              for (no_link=0;no_link<cur_doc.links.length;no_link++)


                  if (cur_doc.links[no_link].name.match(inVal))


                      var folPath=cur_doc.links[no_link].name;  








          function diaVal()


              var myWindow = new Window ("dialog", "Form");

              var myInputGroup = myWindow.add ("group");

              myInputGroup.add ("statictext", undefined, "Find text");

              var myText = myInputGroup.add ("edittext", undefined);

              myText.characters = 10;   

              myText.active = true;

              var myOutputGroup = myWindow.add ("group");

              myOutputGroup.add ("statictext", undefined, "Replace text");

              var myText1 = myOutputGroup.add ("edittext", undefined);

              myText1.characters = 10;

              var myButtonGroup = myWindow.add ("group");

              myButtonGroup.alignment = "right";

              myButtonGroup.add ("button", undefined, "OK");

              myButtonGroup.add ("button", undefined, "Cancel");

              if (myWindow.show ()==1)


              var inputVal =myText.text;

                  var outputVal =myText1.text;

                  return [inputVal,outputVal];







          • 3. Re: Change links for multiple InDesign files
            jonathanlarson Level 1

            Thanks for the script, I will give this a go. Will this scan our directories and update every InDesign file or will this script run when InDesign launches? I apologize for not being more versed with InDesign.

            • 4. Re: Change links for multiple InDesign files
              Level 1

              It will work only active document.

              open the document and run the script and choose art path