Hi
I want to copy these files to another remote directory but receiving the error
"The target file "\\Z02RSIDMC02\Section\Bonds\G-269 PROCESS\FOCUSED BOND REVIEW\Uploaded Documents\test" is a directory, not a file.
I'm that familiar with using .CopyTo and haven't got very far with it. Thanks
Sub btnCopyFiles_Click(ByVal sender As Object, ByVal e As EventArgs)
Dim info As DirectoryInfo = New DirectoryInfo("C:\Inetpub\wwwroot\G269_Focus\Uploads")
Dim files As FileInfo() files = info.GetFiles("*.pdf")
Dim file As FileInfo
Response.Write("The files below will be copied to the Bonds G269 focus review folder for processing:")
For Each file In files
file.CopyTo("\\Z02RSIDMC02\Section\Bonds\G-269 PROCESS\FOCUSED BOND REVIEW\Uploaded Documents\test", True)
Next
End Sub
I want to copy these files to another remote directory but receiving the error
"The target file "\\Z02RSIDMC02\Section\Bonds\G-269 PROCESS\FOCUSED BOND REVIEW\Uploaded Documents\test" is a directory, not a file.
I'm that familiar with using .CopyTo and haven't got very far with it. Thanks
Sub btnCopyFiles_Click(ByVal sender As Object, ByVal e As EventArgs)
Dim info As DirectoryInfo = New DirectoryInfo("C:\Inetpub\wwwroot\G269_Focus\Uploads")
Dim files As FileInfo() files = info.GetFiles("*.pdf")
Dim file As FileInfo
Response.Write("The files below will be copied to the Bonds G269 focus review folder for processing:")
For Each file In files
file.CopyTo("\\Z02RSIDMC02\Section\Bonds\G-269 PROCESS\FOCUSED BOND REVIEW\Uploaded Documents\test", True)
Next
End Sub
Last edited: