Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

martin

Re: Error "Element "mv" not found in the log file" when script move in empty source directory

Thanks for your report.

This bug has been added to the tracker:
https://winscp.net/tracker/1412
ASKant

Error "Element "mv" not found in the log file" when script move in empty source directory

WinSCP Version 5.8.1 beta (Build 6144)


I have exception "Element "mv" not found in the log file" if source directory ("RTD/IN/TMP/") empty and source path contain file mask like "RTD/IN/TMP/*.xml".

public void MoveRemoteFiles()
{

using (Session session = new Session())
{
// Setup session options
SessionOptions sessionOptions = new SessionOptions();
sessionOptions.ParseUrl("sftp://user:password@freeFTPd");
sessionOptions.GiveUpSecurityAndAcceptAnySshHostKey = true;

session.ExecutablePath = @"c:\Utils\WinSCP\winscp.exe";

session.SessionLogPath = "c:\\Utils\\WinSCP\\SessionLogPath.txt";
session.DebugLogPath = "c:\\Utils\\WinSCP\\DebugLogPath.txt";

session.Open(sessionOptions);
session.MoveFile("RTD/IN/TMP/*.xm", "SD/IN/TMP");
}
}