Try using the below code in a code stage
Â
void DownLoadFTP()
{
SessionOptions sessionOptions = new SessionOptions
{
Protocol = Protocol.Ftp,
HostName = "xxxx",
PortNumber = 21,
UserName = @"xxx",
Password = "xxx",
};
using (Session session = new Session())
{
// Connect
session.Open(sessionOptions);
string remotePath = "/Test/",localPath = "D:\\2\\;
TransferOptions ops = new TransferOptions();
ops.TransferMode = TransferMode.Automatic;
TransferOperationResult rst = session.GetFiles(remotePath, localPath, false,ops);
session.Close();
// Your code
}
}