WinSCP.com control via parent process through pipes
Hi Martin & the WinSCP community,
first of all I would like to express my special thanks to you, Martin, for providing such a great tool to the public. WinSCP is very useful and makes our (file-transfer-) lives easier.
To run
But it can not switch off batch mode. The main program sends
Is this a bug or a feature? How does WinSCP even know it is run by a program and not by a user? Does WinSCP observe its stdout and stdin handlers and switch automatically and forcibly to batch mode if there is no standard shell connected to the handlers?
Could you enable to control
Best regards,
Lew
first of all I would like to express my special thanks to you, Martin, for providing such a great tool to the public. WinSCP is very useful and makes our (file-transfer-) lives easier.
To run
WinSCP.com
scripted is a good thing, but not enough for me. I want to use WinSCP 5.2.3 beta's file transfer capabilities to automatize some more sophisticated tasks. To do this I wrote a C program that launches WinSCP.com
as a child process (via CreateProcess
) and creates some anonymous pipes. These pipes are connected to WinSCP.com
's stdout and stdin. It works, the main program can read WinSCP's output and can command it.
But it can not switch off batch mode. The main program sends
batch off
to WinSCP, WinSCP confirms that and ignores it! It behaves like it would run a script. It decides to answer user questions automatically in a way I don't want. I did all the work with the C main program to have the control (like a human user of WinSCP.com
would have) to implement a more complex logic than a WinSCP script can have.
Is this a bug or a feature? How does WinSCP even know it is run by a program and not by a user? Does WinSCP observe its stdout and stdin handlers and switch automatically and forcibly to batch mode if there is no standard shell connected to the handlers?
Could you enable to control
WinSCP.com
from a parent process via stdin and stdout completely? This would be fantastic!
Best regards,
Lew