如果有子目录,需要递归进去处理,使用GetDirList获取目录,再逐一取子目录里的文件
Dim ftp1 As New FtpClient
Dim fls As List(of String) ftp1.Host=""ftp1.Account = "foxtable"ftp1.Password = ""fls = ftp1.GetFileList("\存货名称图片")For Each fl As String In fls Output.Show(fl)Next
Dim fls2 As List(of String) = ftp1.GetDirList("\存货名称图片")
For Each fl2 As String In fls2
fls = ftp1.GetFileList(fl2)
For Each fl3 As String In fls
Output.Show(fl3)
Next
Next