Post a reply

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

inkster jim

What do you need to become a forum user

?????????
lumax

XML logging might be a solution, but then I have to rewrite a lot in my application :/
martin

Re: WinSCP.com - Both print and redirect output?

When output is redirected (does not matter if to file or pipe), the transfer status is not written.

There's no way to do what you ask for.

Maybe you can use logging instead of output redirection. Have you check XML logging?
https://winscp.net/eng/docs/logging_xml
lumax

WinSCP.com - Both print and redirect output?

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).