SAMPLE 1:
FtpWebRequest request =
(FtpWebRequest)WebRequest.Create
("
ftp://127.0.0.0/my.txt ");
request.Method =
WebRequestMethods.Ftp.DownloadFile;
request.Credentials = new
NetworkCredential("userid",
"pasword");
FtpWebResponse response =
(FtpWebResponse)request.GetResponse
();
Stream responseStream =
response.GetResponseStream();
FileStream file = File.Create(@c:
\temp\my.txt);
byte[] buffer = new byte[32 *
1024];
int read;
//reader.Read(
while ((read =
responseStream.Read(buffer, 0,
buffer.Length)) > 0)
{
file.Write(buffer, 0, read);
}
file.Close();
responseStream.Close();
response.Close();
SAMPLE 2:
private void DownloadFileFTP()
{
string inputfilepath = @"C:\Temp
\FileName.exe";
string ftphost = "xxx.xx.x.xxx";
string ftpfilepath = "/Updater/< ...
Go to the complete details ...