XML logging might be a solution, but then I have to rewrite a lot in my application :/
Is it possible to both print the output in the console and redirect it to a file?
Today Im using winsp.com /script=script.txt > output.txt, then I use a "tail.exe" to read the output file so I know whats going on. The problem is that winscp.com does not write to output file until current action is completed, so I can't see transfer status (like speed) on big files.
I have tried to pipe the output to a program like tee.exe which print the output and then send it to output.txt, but when I do that the exit code comes from tee.exe (always success).