Dim spath As String = "\\KMCTZD\kmctzd$\档案存储\"
Dim dpath As String = "f:\" '"C:\Users\WC\Desktop\接收下载\"
Dim errfiles As String
Dim scsFiles As String
For Each r As Row In Tables("档案管理_Table3").GetCheckedRows
If r.Isnull("归档文件") = False Then
For Each file As String In r.DataRow("归档文件").Lines
If FileSys.FileExists(spath & file) Then
FileSys.CopyFile(spath & file,dpath & file,True)
If FileSys.FileExists(dpath & file) = True Then
scsFiles = scsFiles & file & vbcrlf
Else
errfiles = errfiles & file & vbcrlf
End If
Else
errfiles = errfiles & file & vbcrlf
End If
Next
End If
Next
If scsFiles > "" Then
Messagebox.show("以下文件下载成功!" & vbcrlf & scsFiles ,"提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
End If
If errfiles > "" Then
Messagebox.show("以下下载失败!" & vbcrlf & errfiles ,"提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
End If