//Create some test files to upload
Dictionary<string, string> files = new Dictionary<string, string>();
for (int i = 0; i < 10; i++)
{
string filePath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "uploadfile" + i + ".txt");
File.WriteAllText(filePath, "This is a test");
files.Add(filePath, Path.GetFileName(filePath));
}
Stopwatch watch = new Stopwatch();
FTP ftp = new FTP(); //Trial Mode
//FTP ftp = new FTP("place user name here", "place license key here");
// set the name of the FTP server( its URL )
ftp.HostAddress = "ftp.fsz.bme.hu"; // a hungarian university. change this to your ftp server
ftp.UserName = "anonymus"; // replace with your user name
ftp.Password = "user@mail.com"; // replace with your password
ftp.EnableLogging();
ftp.Connect();
ftp.CurrentDirectory = "/TestDir";
ftp.UploadFilesInParallel(files);
ftp.Disconnect();