Skip to main content
Participant
January 18, 2012
Question

How to change a link (new name) in Indesign with 75 documents

  • January 18, 2012
  • 2 replies
  • 2232 views

Hello readers

This is my problem i have 75 indesign documents with different sizes named >>> Winter 2011 120cmx200cm, Winter 2011 200cmx225cm etc etc)

Renaming is not a problem in Bridge changing Winter 2011 into Spring 2012

But i want to change the imported foto "Winter.eps" into "Spring.eps" and i want to do it quickly because i have to update 35 series of 75 documents

Greetings Romano

This topic has been closed for replies.

2 replies

Inspiring
January 23, 2012

I had to do a similar thing.

The script above doesn't really seem to suit your need (I can't get it to work and I've given up trying, seems to me that it can't find image ) given that it would require you to select each file, which isn't any quicker than simply changing it within the file yourself. Anyways for lack of an actual script to do this I just did a conversion to IDML. I then did a Search and Replace through all of the IDML files with Oxygen XML on the part of the link I wanted to change (I had to change file names as well as some paths). The end result is I was able to change all of the links on a 500 file set in a couple of hours.

The part that takes the longest is switching from IDML to INDD.

So if you need a quick fix until someone can come up with an actual solution to your problem you could try that.

Participant
January 18, 2012

Using CS5 7.0.4

Known Participant
January 21, 2012

If they're placed simply in rectangles on pages (not embedded in text or anything else), something like this ought to  work:

var docNum, spreadNum, rectNum;

var doc, spread, img;

for (docNum = 0; docNum < app.documents.length; docNum += 1) {

  doc = app.documents[docNum];

  for (spreadNum = 0; spreadNum < doc.spreads.length; spreadNum += 1) {

    spread = doc.spreads[spreadNum];

    for (rectNum = 0; rectNum  < spread.rectangles.length; rectNum += 1) {

      img = spread.rectangles[rectNum].images[0];

      if (img.itemLink.name === '<your old file name>') {

        img.place( '<new file path>' );

      }

    }

  }

}

Make sure you get the file path exactly right. That can be tricky.

John Hawkinson
Inspiring
January 22, 2012
Make sure you get the file path exactly right. That can be tricky.

It's a good idea, in scripts like this, to operate based on the selection (for the image name), and to prompt the user for the new file path with File.openDialog().