Re: error using move file
Yes, I am trying to move files, not a folder. I think your reply helped me. Thanks.
General failure (server should provide error description).
Error code: 4
Error message from server: Failure
using (Session session = new Session())
{
// Connect
string sftpFolder = "/parcs/download/" + mSysParam.Company;
mLgr.LogInfo(sftpFolder);
session.Open(sessionOptions);
// download files
TransferOptions transferOptions = new TransferOptions();
transferOptions.TransferMode = TransferMode.Binary;
TransferOperationResult transferResult;
transferResult =
session.GetFilesToDirectory(sftpFolder, mApplicationDataPath);
localPPCounter++; //increase PP count so loop will stop
//// Print results
foreach (TransferEventArgs transfer in transferResult.Transfers)
{
mLgr.LogInfo("Download of file succeeded: " + transfer.FileName);
mLgr.LogInfo("Destination:" + transfer.Destination);
}
session.MoveFile("/parcs/download/","/parcs/download/PNB/Processed");
}