13 Years of Service
24%
A simple function to upload a file to your/other's FTP server:
Use:
Code:
>public static void Upload(string ftpServer, string userName, string password, string filename)
{
using (System.Net.WebClient client = new System.Net.WebClient())
{
client.Credentials = new System.Net.NetworkCredential(userName, password);
client.UploadFile(ftpServer + "/" + new FileInfo(filename).Name, "STOR", filename);
}
}
Code:
>Upload("ftp://myserver.com", "CaptainBri", "MyPass", "C:\\File.doc");