This content has been marked as final. Show 3 replies
I have used this script to update path names in links:
new_path = '/d/temp/'
imgs = app.activeDocument.allGraphics
for (i = 0; i < imgs.length; i++)
img = imgs[i].itemLink
img.relink (File (new_path + img.name))
Just enter the name of the new path after new_path.
Thanks! But, this may not work for us. The "newpath" could be one of
two options. (We have a folder organization system that sometimes gets
Ask them to choose a folder themselves and then try to relink all missing graphics against that new folder. That's how I do it.
Also, it's flexible no matter what weird situation the users come up with. The only gotcha I am aware of is if you somehow have bad and good graphics mixed in the same folder, in which case it will update both the good and the bad graphic links successfully.
I work in Applescript, but it's something like:
set missingLinks to id of every link whose status = link missing
set chosenFolder to choose folder with prompt "Choose the folder you wish to try to relink to:"
repeat with thisLinkID in missingLinks
set thisLink to item 1 of (every link whose id = thisLinkID)
relink thisLink to (chosenFolder & name of thisLink) as string