Dim dlg As New FolderBrowserDialog
Dim f As String = ProjectPath & "RemoteFiles"
If dlg.ShowDialog = DialogResult.Ok Then
msgbox(dlg.SelectedPath )
Dim ftp As FTPClient = Tables("产品资料库_资料信息").Cols("文件管理").DataCol.FTPClient
For Each r As Row In Tables("产品资料库_资料信息").rows
Dim file = f & r("文件管理").replace("/","\")
If FileSys.FileExists(file) Then
msgbox(dlg.SelectedPath & FileSys.GetName(r("文件管理")))
FileSys.CopyFile(file,dlg.SelectedPath & FileSys.GetName(r("文件管理")),True)
Else
If ftp.Download(r("文件管理"),dlg.SelectedPath & FileSys.GetName(r("文件管理")))
Messagebox.show("下载完成!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
Else
Messagebox.show("下载失败!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
End If
End If
Next
End If