//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();
SFTP sftp = new SFTP(); //Trial Mode
//SFTP sftp = new SFTP("place user name here", "place license key here");
// set the name of the SFTP server( its URL )
sftp.HostAddress = "sftp.fsz.bme.hu"; // a hungarian university. change this to your sftp server
sftp.UserName = "anonymus"; // replace with your user name
sftp.Password = "user@mail.com"; // replace with your password
sftp.EnableLogging();
sftp.Connect();
sftp.CurrentDirectory = "/TestDir";
sftp.UploadFilesInParallel(files);
sftp.Disconnect();