Posting multiple commands in WinsCP.com

Advertisement

llong
Joined:
Posts:
1

Posting multiple commands in WinsCP.com

I have to write a script that is for a 32-bit machine to perform SFTP. I need to be able to process multiple commands as different point in the script. In short...
1) Connect to SFTP server
2) Pull a file of available files
3) Parse the list and for each file...
a. Upload the file
b. Perform a process for each file

I am pulling the list using the ls command in strArg..
winscp.StandardInput.WriteLine(strArg);
winscp.StandardInput.Close();
...but when I try to write any subsequent command, I get an error citing "Cannot write to a closed TextWriter". Without the Close() command, the process hangs. How do I invoke the ls without closing the TextWriter?

Thank you

Reply with quote

Advertisement

Advertisement

You can post new topics in this forum