Message From server: 141 Can't open log file 'D:\\log.xml'
I publish the sample code below in server:
const string log_path = "log.xml"; Process winscp = new Process(); winscp.StartInfo.FileName = "C:\\program files\\winscp\\winscp.com "; winscp.StartInfo.Arguments = "/log=D:\\" + log_path; winscp.StartInfo.UseShellExecute = false; winscp.StartInfo.RedirectStandardInput = true; winscp.StartInfo.RedirectStandardOutput = true; winscp.StartInfo.CreateNoWindow = true; winscp.Start(); winscp.StandardInput.WriteLine("option batch abort"); winscp.StandardInput.WriteLine("option confirm off"); winscp.StandardInput.WriteLine("open mysession"); winscp.StandardInput.WriteLine("ls "); winscp.StandardInput.Close(); string output = winscp.StandardOutput.ReadToEnd(); winscp.WaitForExit();
winscp> option batch abort
batch abort
winscp> option confirm off
confirm off
winscp> open user:pass@ip_host
141 Can't open log file 'D:\\log.xml'.
And when I check on the hard disk D in server, there's no log file created. Please check and help me ASAP.