Dim ftp As New ftpclient
ftp.host = "***"
ftp.Account = "***"
ftp.password = "***"
ftp.Port = "21"
ftp.UTF8 = False
Dim 默认目录 As String = ProjectPath & "RemoteFiles\" & dr("企业名称") & "\" & dr("年度") & "\隐患排查治理台账\"
If FileSys.DirectoryExists(默认目录) = False Then
If FileSys.CreateDirectory(默认目录) = False;se Then
MessageBox.Show("创建目录失败")
Return
End If
End If
For Each dr As DataRow In DataTables("隐患排查整改报告").Select("[选择] = true")
Dim path1 As String = 默认目录 & FileSys.GetName(dr("隐患照片"))
ftp.Download(dr("隐患照片"), path1, True)
Dim path2 As String = 默认目录 & FileSys.GetName(dr("验证照片"))
ftp.Download(dr("验证照片"), path2, True)
Next
ftp.Close