Hi Jos,
I don't believe filecopy works with UNC paths.
You can map the UNC path to a drive letter on the fly with MyDrive=shell (net use...)
Then you can do...
FileCopy "C:\TEMP\Test.xls", MyDrive & "\Test.xls"
And it would be nice to have the option to kill the mapping on exit.
See some other info here.
http://www.google.com/groups?hl=en&l...r%3D%26hl%3Den
As far as not knowing what drive the user is using for the data, make them browse to the folder and store it as a variable.
--
John
johnf 202 at hotmail dot com
"Jos Vens" wrote in message ...
| Hi,
|
| I discovered that it is not possible to use the FileCopy statement in
| junction with a UNC pathname.
|
| eg. FileCopy "C:\TEMP\Test.xls", "F:\LibraData\Test.xls" works fine
| FileCopy "C:\TEMP\Test.xls", "\\Acer01\LibraData\Test.xls" don't works. I
| get the error message: 75 cannot access... however, LibraData is shared on
| my computer with the name Acer01.
|
| How can I solve this (I don't know on which drive the user has placed his
| data). Is it possible to get the local pathname out of the shared UNC
| pathname (so that \\Acer01\ is translated to eg. F:\) or is there an
| alternative for the FileCopy statement?
|
| Thanks
| Jos Vens
|
|