呵呵,UploadDirectory是上传整个目录,楼主要的是下载,还是需要遍历的:
Dim ftp1 As New FtpClient
Dim fls As List
ftp1.Host="196.128.143.28"
ftp1.Account = "foxuser"
ftp1.Password = "138238110"
fls = ftp1.GetFileList("\upfile1\pic")
For Each fl As String in fls
if ftp1.Download(fl,"c:\data") = False
Messagebox.show("下载失败!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
Exit for
End If
Next
Messagebox.show("下载完成!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
以后有空再做个下载整个目录的方法吧。