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

thommck

I had a feeling that was the case so thanks for the clarification
martin

Re: Log not reporting status code "226 Transfer complete"

The 226 is FTP protocol status code. You are using SFTP protocol now.
Anyway, you should not parse the log file to determine if transfer was successful or not.
Test WinSCP exit code instead. See https://winscp.net/eng/docs/faq_script_result
thommck

Log not reporting status code "226 Transfer complete"

We are replacing an native Winsdows FTP with an SFTP process using WinSCP.com.
Out old FTP log files would show the staus code "226 Transfer complete" on a successful get or put command
However, I can't see if this is being logged in the new WinSCP script.

Is it not supported or do I need to look somewhere else for this?

Batch Script
"c:\Program Files\WinSCP\WinSCP.com" /script="c:\temp\get-test.txt" /log="c:\temp\get-test.log" /xmllog="c:\temp\get-test.xml"


WinSCP Script
option batch abort

option confirm off

open sftp://xxxx@website.xxxxx.com/ -hostkey="ssh-rsa 2048 XX:XX:16:aa:56:0d:14:44:91:26:bc:33:e9:d5:66:45"

get /folder/outgoing/test.txt c:\temp\

close
exit


I have tried setting the logging level to Debug 1 and 2 but it still won't report "226 Transfer complete" anywhere.
I have seen the code appear in other users logs on this forum so I'm hoping it is just an option I can set somewhere to include it