Skip to main content
January 21, 2020
Question

Bulk Path Update

  • January 21, 2020
  • 2 replies
  • 1375 views

Hi,

 

I have a client who uses the adobe suite and has a large number of linked images, we are preparing to repalce a legacy file server so the path to files will change.

Is there a bulk update tool which can assist with this?

 

I have seen a link to "kasyan" script but the links dont work and the website appears to be down.

 

Thanks

This topic has been closed for replies.

2 replies

rob day
Community Expert
Community Expert
January 21, 2020

What OS are you on? If the only change is the root server I have an Applescript that might work.

January 21, 2020

Hi Rob,

 

The users are on Mac (multiple) with the data being hosted on a Windows Server OS

 

Andy

rob day
Community Expert
Community Expert
January 21, 2020

The InDesign file paths on OSX are colon delimited, so if all the file paths are returning as server:share1:type:Picture:image1 and the new path is NEWSERVER:share1:type:Picture:image1 then the script below should work.

 

The link’s file path is read only—you can’t change the path string. So the script needs to relink to the new files, and if the files don’t exist or the server is not connected there will be an error.

 

--relinks document links when the only change is the root volume

--edit as needed
set newserver to "NEWSERVER"

tell application id "com.adobe.indesign"
	set dlinks to every link of active document
	repeat with x in dlinks
		set newpath to my changeserver(file path of x as string, newserver)
		try
			relink x to newpath as alias
		end try
	end repeat
end tell


on changeserver(t, r)
	set ns to ""
	set AppleScript's text item delimiters to ":"
	set tlist to every text item of t
	set item 1 of tlist to r
	set AppleScript's text item delimiters to ""
	repeat with x in tlist
		set ns to ns & ":" & x
	end repeat
	set ns to text 2 thru -1 of ns
	return ns
end changeserver

 

brian_p_dts
Community Expert
Community Expert
January 21, 2020

Can you use the built-in Relink to Folder command? Select all links in your Links panel, then point them to a new folder with this: 

January 21, 2020

I dont actually use the product, but i am being told we cant do this.

 

The paths are all over the place, for example:

 

\\server\share1\type\product\product1

\\server\share1\type\product\product2

\\server\share1\type\product\product3

\\server\share1\type\product\product4

\\server\share1\type\Picture\image1

\\server\share1\type\Picture\image2

etc

 

with hundreds of sub locations.

 

Waht i would effectively like to change is the first part only..

 

From:

\\server\share1\type\Picture\image1

to

\\NEWSERVER\share1\type\Picture\image1

 

Hope this make sense - would the method you have suggested work for this or would it update everything to the full path?

 

brian_p_dts
Community Expert
Community Expert
January 21, 2020

Yeah, that wouldn't work, I don't think. No other existing scripts that I am aware of. Kasyan's site was up the other day; maybe it's just down temporarily?

 

It is possible to do with scripting. Feel free to PM if you want some help putting something together for a nominal fee.