Log not reporting status code "226 Transfer complete"

Advertisement

thommck
Joined:
Posts:
2
Location:
UK

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

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
27,426
Location:
Prague, Czechia

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

Reply with quote

Advertisement

You can post new topics in this forum