Topic "Log not reporting status code "226 Transfer complete""

Author Message
thommck
[View user's profile]

Joined: 2014-09-17
Posts: 2
Location: UK
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
Code:
"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
Code:
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
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24995
Location: Prague, Czechia
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
[View user's profile]

Joined: 2014-09-17
Posts: 2
Location: UK
I had a feeling that was the case so thanks for the clarification
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License