Copying using FileSystemObject
The code herein attemts to copy a file from the network to a user's PC, but fails with message saying Bad file name or number. The error code from WSH is 800A004C. I cant see what is wrong with my code to get this error. Any ideas ?? I should also mention I am running the code from a local machine not from the network.
Dim objFSO
Dim scurPath
Set objFSO = CreateObject("Scripting.FileSystemObject")
sCurPath = CreateObject("Scripting.FileSystemObject").GetAbsolutePathName(".")
objFSO.CopyFile chr(34) & sCurPath & "\mapinfow.prj" & Chr(34),Chr(34) & "C:\Program Files\Mapinfo\Professional\" & Chr(34), True
Dim objFSO
Dim scurPath
Set objFSO = CreateObject("Scripting.FileSystemObject")
sCurPath = CreateObject("Scripting.FileSystemObject").GetAbsolutePathName(".")
objFSO.CopyFile chr(34) & sCurPath & "\mapinfow.prj" & Chr(34),Chr(34) & "C:\Program Files\Mapinfo\Professional\" & Chr(34), True
0 Comments
[ + ] Show comments
Answers (2)
Please log in to answer
Posted by:
krpa
13 years ago
Posted by:
squeakstar
13 years ago
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.