L
LarryP
I have two different databases where I want to simply copy a number of
network files to a folder on my c:\ drive. In one case it works fine; in the
other I get a Runtime Error 70, Permission Denied. I've closely examined the
properties of the two destination folders and can see no difference. The
code for the two procedures, first the one that works and then the one that
doesn't, are shown below. Any and all ideas welcome.
By the way, in trying to find a fix I have modified the code in the first
procedure so that it more closely parallels the second, in that it uses a
variable for part of the destination string, and it still worked fine. It
appears to be only in the second database that this problem is dogging me.
*********This one works just fine**********
Public Function LoadTheFiles()
Dim strPath As String
strPath = "c:\Toolsmaster\"
FileCopy "\\apfs\projs\prodcntl_ops\Entrpris\Data\PRISM\MSAccess
Tools\PCMetrics Tool.mdb", strPath & "PCMetrics Tool.mdb"
FileCopy "\\apfs\projs\prodcntl_ops\Entrpris\Data\PRISM\MSAccess
Tools\VSMetrics Tool.mdb", strPath & "VSMetrics Tool.mdb"
…additional lines to copy more files
End Function
*****Extract of second procedure -- this one throws the error:
…
Path1 = "\\apfs\projs\prodcntl_ops\Entrpris\Data\PRISM\"
Path2 = "c:\NAPI Tool Files\"
…
CopyIfNewer Path1 & "PTS Tool\PTS BE.mdb", Path2 & "PTS BE.mdb"
CopyIfNewer Path1 & "Shared Access Databases\Tools Update Status.mdb",
Path2 & "Tools Update Status.mdb"
CopyIfNewer Path1 & "Shared Access Databases\MasterCal.mdb", Path2 &
"MasterCal.mdb"
network files to a folder on my c:\ drive. In one case it works fine; in the
other I get a Runtime Error 70, Permission Denied. I've closely examined the
properties of the two destination folders and can see no difference. The
code for the two procedures, first the one that works and then the one that
doesn't, are shown below. Any and all ideas welcome.
By the way, in trying to find a fix I have modified the code in the first
procedure so that it more closely parallels the second, in that it uses a
variable for part of the destination string, and it still worked fine. It
appears to be only in the second database that this problem is dogging me.
*********This one works just fine**********
Public Function LoadTheFiles()
Dim strPath As String
strPath = "c:\Toolsmaster\"
FileCopy "\\apfs\projs\prodcntl_ops\Entrpris\Data\PRISM\MSAccess
Tools\PCMetrics Tool.mdb", strPath & "PCMetrics Tool.mdb"
FileCopy "\\apfs\projs\prodcntl_ops\Entrpris\Data\PRISM\MSAccess
Tools\VSMetrics Tool.mdb", strPath & "VSMetrics Tool.mdb"
…additional lines to copy more files
End Function
*****Extract of second procedure -- this one throws the error:
…
Path1 = "\\apfs\projs\prodcntl_ops\Entrpris\Data\PRISM\"
Path2 = "c:\NAPI Tool Files\"
…
CopyIfNewer Path1 & "PTS Tool\PTS BE.mdb", Path2 & "PTS BE.mdb"
CopyIfNewer Path1 & "Shared Access Databases\Tools Update Status.mdb",
Path2 & "Tools Update Status.mdb"
CopyIfNewer Path1 & "Shared Access Databases\MasterCal.mdb", Path2 &
"MasterCal.mdb"