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

nishit.2571988@gmail.com

issue resolve

Thanks my issue has been resolve to modifying code
nishit.2571988@gmail.com

Log or xml log is not work

My code is like below log or xml log is not created. Once xml log is work then I retrieve file listing from xml log.
Process winscp=null;
ProcessStartInfo startInfo=new ProcessStartInfo
{
  FileName="C:\\Program Files (x86)\\WinSCP\winscp.com",
  RedirectStandardInput=true,
  RedirectStandardOutput=true,
  RedirectStandardError=true,
  UseShellExecute=false,
  CreateNoWindow=true,
}
winscp.StartInfo=startInfo;
winscp.Start();
winscp.BeginOutputReadLine();
winscp.BeginErrorReadLine();
 
try
{
  winscp.StandardInput.WriteLine("winscp.com /log=\"c:\\Users\Test\Desktop\\log.txt\" /xmllog=\"c:\\Users\Test\Desktop\\xmllog.xml\"");
  winscp.StandardInput.WriteLine("open ftp://XXXX:XXXX@XXXX.com");
  winscp.StandardInput.WriteLine("lcd c:\\Users\Test\Documents");
  winscp.StandardInput.WriteLine("cd /'XXX.' ");
  winscp.StandardInput.WriteLine("ls");
}
catch(Exception ex)
{
}
nishit.2571988@gmail.com

Collect list of filenames from remote directory in local text file using command line

winscp> call ls \fileList.txt

This is not work

Not work directory listing in separate text file

Expected output
filelist.txt

file1
file2
file3