akshaychand wrote:
I understand that Status/error Code 1 signifies an EOF and not an error message. But why is it that WinSCP's exit code is 1 in this case. I am using .NET's Process to execute WinSCP, and when I check the exit Code it is set to 1, which, by convention means an error.
I forgot to post the logs. .NET's Exit code is 1, although the file got transfered and there's nothing in the logs.
Here are the logs.
. 2010-05-14 10:02:43.753 Using SFTP protocol.
. 2010-05-14 10:02:43.753 Doing startup conversation with host.
> 2010-05-14 10:02:43.753 Type: SSH_FXP_INIT, Size: 5, Number: -1
< 2010-05-14 10:02:43.941 Type: SSH_FXP_VERSION, Size: 5, Number: -1
. 2010-05-14 10:02:43.941 SFTP version 3 negotiated.
. 2010-05-14 10:02:43.941 We believe the server has signed timestamps bug
. 2010-05-14 10:02:43.941 We will use UTF-8 strings for status messages only
. 2010-05-14 10:02:43.941 Getting current directory name.
. 2010-05-14 10:02:43.941 Getting real path for '.'
> 2010-05-14 10:02:43.941 Type: SSH_FXP_REALPATH, Size: 10, Number: 16
< 2010-05-14 10:02:44.441 Type: SSH_FXP_NAME, Size: 51, Number: 16
. 2010-05-14 10:02:44.441 Real path is '/'
. 2010-05-14 10:02:44.441 Startup conversation with host finished.
. 2010-05-14 10:02:44.441 Listing file "XYZ.pdf".
> 2010-05-14 10:02:44.441 Type: SSH_FXP_LSTAT, Size: 29, Number: 263
< 2010-05-14 10:02:45.363 Type: SSH_FXP_ATTRS, Size: 37, Number: 263
. 2010-05-14 10:02:45.363 File: "/XYZ.pdf"
. 2010-05-14 10:02:45.363 Copying "/XYZ.pdf" to local directory started.
. 2010-05-14 10:02:45.363 Binary transfer mode selected.
. 2010-05-14 10:02:45.363 Confirming overwriting of file.
. 2010-05-14 10:02:45.363 Opening remote file.
> 2010-05-14 10:02:45.363 Type: SSH_FXP_OPEN, Size: 37, Number: 515
< 2010-05-14 10:02:45.800 Type: SSH_FXP_HANDLE, Size: 10, Number: 515
> 2010-05-14 10:02:45.800 Type: SSH_FXP_READ, Size: 22, Number: 1029
< 2010-05-14 10:02:47.035 Status/error code: 1
. 2010-05-14 10:02:47.035 22 skipped SSH_FXP_WRITE, SSH_FXP_READ, SSH_FXP_DATA and SSH_FXP_STATUS packets.
> 2010-05-14 10:02:47.035 Type: SSH_FXP_CLOSE, Size: 10, Number: 4356
< 2010-05-14 10:02:47.035 Type: SSH_FXP_STATUS, Size: 17, Number: 3589
< 2010-05-14 10:02:47.035 Type: SSH_FXP_STATUS, Size: 17, Number: 3845
< 2010-05-14 10:02:47.050 Type: SSH_FXP_STATUS, Size: 17, Number: 4101
. 2010-05-14 10:02:47.050 Closing connection.
. 2010-05-14 10:02:47.050 Sending special code: 12
. 2010-05-14 10:02:47.050 Sent EOF message