Dim Request As FtpWebRequest Dim Response As FtpWebResponse Request = DirectCast(FtpWebRequest.Create(FtpFolderPath), FtpWebRequest) Request.Credentials = New NetworkCredential(UserName.Normalize, Password.Normalize) Request.Proxy = Nothing Request.Method = WebRequestMethods.Ftp.ListDirectory Request.UseBinary = True Response = DirectCast(Request.GetResponse(), FtpWebResponse) Dim reader As New StreamReader(Response.GetResponseStream()) Dim Data As String = reader.ReadToEnd() Data = Data.Replace(vbCrLf, vbCr).TrimEnd(Chr(13)) reader.Close() Response.Close() Return Data.Split(ControlChars.Lf)
Dim Data As String = reader.ReadToEnd().Replace("./" & vbCrLf & "../" & vbCrLf, "")
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)