How to open net folder?

“smb://ad/Prepress/123/321/111”
I have this path in Outlook message. So i would like to open this target right away, and not to waste time while surfing in numerous folders on net server.
Now i learned how to copy this path and pass this to AppleScript. But so far i need to modify rhis string path for AppleScript.
So i need to change “/” on “:”, and to cnahge “smb://ad/Prepress” to “Mac:Volumes:Prepress:”.
How to wright this?

Thanks.

You may try :

set orig to "smb://ad/Prepress/123/321/111"
set modif to my remplace(orig, "smb://ad", "Mac:Volumes")
set modif to my remplace(modif, "/", ":")


#=====
(*
replaces every occurences of d1 by d2 in the text t
*)
on remplace(t, d1, d2)
	local oTIDs, l
	set {oTIDs, AppleScript's text item delimiters} to {AppleScript's text item delimiters, d1}
	set l to text items of t
	set AppleScript's text item delimiters to d2
	set t to l as text
	set AppleScript's text item delimiters to oTIDs
	return t
end remplace

#=====

Yvan KOENIG (VALLAURIS, France) lundi 29 décembre 2014 14:11:48

Yvan Koenig, many thanks. This works perfect!