|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Ftp Client Helpbut i don't understand some things. why won't this code resolve to a IP based ftp server? how can i download everything at this site without a GUI? Thanks ahead of time. Imports System.IO Imports System.Net Imports System.Text Public Class SimpleFTPClient Public Function download() As FtpStatusCode Try sqlUser = "xxx" sqlPass = "xxx" sqlIP = "xxx.xxx.xxx.xxx" Dim ftpRequest As FtpWebRequest = CType(WebRequest.Create(sqlIP), FtpWebRequest) ftpRequest.Method = WebRequestMethods.Ftp.DownloadFile Dim ftpResponse As FtpWebResponse = CType(ftpRequest.GetResponse, FtpWebResponse) Dim stream As Stream = Nothing Dim reader As StreamReader = Nothing Dim writer As StreamWriter = Nothing Dim destinationFile As String destinationFile = "C:\FrankSilvaFTP" Try stream = ftpResponse.GetResponseStream reader = New StreamReader(stream, Encoding.UTF8) writer = New StreamWriter(destinationFile, False) writer.Write(reader.ReadToEnd) Return ftpResponse.StatusCode Finally stream.Close() reader.Close() writer.Close() End Try Catch ex As Exception Throw ex End Try End Function Public sqlUser As String Public sqlPass As String Public sqlIP As String End Class <jonathandr***@gmail.com> wrote in message
news:1159400212.149986.309940@h48g2000cwc.googlegroups.com... Why do you want to?> Hi, all. new to this ftp stuff. i found this information on the msdn, > but i don't understand some things. why won't this code resolve to a > IP based ftp server? how can i download everything at this site > without a GUI?
Bug in Datagrids
XML to save some settings Multiple child forms - updating the right one Finding a control on a form with a text reference overflow detection without try-catch Permanent Rectangle on Form. filter dataTable/datagridview to show top 1 row for duplicate IDs? Are you a C# Developer in Buckinghamshire? Date as Null DirectX and Sound |
|||||||||||||||||||||||