cmo ler o dado de um cliente ftp usando vbnet
Public Sub EnviarArquivoFTP(ByVal caminhoArquivoFtp As String, ByVal arquivo As String)
'Informe o nome servidor ftp ou ip
Dim ftphost As String = "127.0.0.1"
Dim caminhoFTP As String = "ftp://" & ftphost & caminhoArquivoFtp
Dim ftp As FtpWebRequest = DirectCast(FtpWebRequest.Create(caminhoFTP), FtpWebRequest)
'define as credenciais
ftp.Credentials = New NetworkCredential(txtUsuario.Text, txtSenha.Text)
'define o tipo de ação
ftp.KeepAlive = True
ftp.UseBinary = True
ftp.Method = WebRequestMethods.Ftp.UploadFile
'trata o retorno
Dim fs As FileStream = File.OpenRead(arquivo)
Dim buffer As Byte() = New Byte(fs.Length - 1) {}
fs.Read(buffer, 0, buffer.Length)
fs.Close()
Dim ftpstream As Stream = ftp.GetRequestStream()
ftpstream.Write(buffer, 0, buffer.Length)
ftpstream.Close()
End Sub