Collect list of filenames from remote directory in local text file using command line
winscp> call ls \fileList.txt
Not work directory listing in separate text file
Expected output
filelist.txt file1 file2 file3
Advertisement
winscp> call ls \fileList.txt
filelist.txt file1 file2 file3
Advertisement
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) { }
Advertisement
You can post new topics in this forum