I didn't look too closely at your code before, but...
You are expanding variables inside this string:
code:
$lehman_mesdoc="\\$machines\c$\mes documents\leh_data"
This is fine for $machines, because that is exactly what you want to do. But what about the "c$"? What do tyou think that "$" there might expand to?
Try changing the line to:
code:
$lehman_mesdoc="\\$machines\c$$\mes documents\leh_data"
Using "$$" explicitly states that you want a "$" in the string, not a variable to be expanded.
The reason you are getting the error 2 is because the resultant path is not what you expected it to be and it really can't find it.
Try displaying the path after you have created it, and you will see what I mean.
This is a good example of why you should include error checking, even when you are sure that you don't need it ![[Wink]](images/icons/wink.gif)
[ 21. November 2002, 14:48: Message edited by: Richard Howarth ]