Dim r As Row = Tables("文档表").Current
If r IsNot Nothing Then
Dim ftp1 As New FtpClient
ftp1.Host="47.91.11.151"
ftp1.Account = "ftpuser"
ftp1.Password = "ftp@163"
For Each fl As String In r.DataRow.Lines("附件")
Dim file As String = _xmml & "\附件区\" & fl
If ftp1.FileExists(file) Then '如果存在则删除
If ftp1.DeleteFile(file) = True Then '这里要带路径的
Messagebox.show("ftp文档" & fl & "删除成功!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
Else
Messagebox.show("ftp文档" & fl & "删除失败,请管理员手动删除!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
End If
Else
messagebox.Show("ftp文档" & fl & "不存在!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
End If
Next
r.Delete
End If