Topic "How to check if command line command has worked successfully"

Author Message


Hi Support,

I am using WinSCP command line to get couple of files from the a unix server to Windows server. I have created a VBScript to get these files, the script works fine. I need to check in the script if both files have been copied successfully. I output a log file in the command but the log file does not say the file has been transfered or copied something like that. My idea is to look for this message that confirms the file has been transfered successfully, if not found then throw exception.

Is there a way I could increase the log levels? so that the log file will have more details? Or is there way to check if the file has been transfered successfully?

Snippet from the log file:
2013-08-05 12:50:15.290 File: "/apps/asdf/acsdextract/orders/orderitem.csv"
. 2013-08-05 12:50:15.291 Copying "/apps/asdf/acsdextract/orders/orderitem.csv" to local directory started.
. 2013-08-05 12:50:15.291 Binary transfer mode selected.
. 2013-08-05 12:50:15.291 Opening remote file.
> 2013-08-05 12:50:15.291 Type: SSH_FXP_OPEN, Size: 64, Number: 1283
< 2013-08-05 12:50:15.292 Type: SSH_FXP_STATUS, Size: 24, Number: 1028
. 2013-08-05 12:50:15.292 Discarding reserved response
< 2013-08-05 12:50:15.294 Type: SSH_FXP_HANDLE, Size: 13, Number: 1283
> 2013-08-05 12:50:15.294 Type: SSH_FXP_FSTAT, Size: 13, Number: 1544
< 2013-08-05 12:50:15.297 Type: SSH_FXP_ATTRS, Size: 37, Number: 1544
. 2013-08-05 12:50:15.298 Confirming overwriting of file.
> 2013-08-05 12:50:15.299 Type: SSH_FXP_READ, Size: 25, Number: 1797
< 2013-08-05 12:50:15.313 Status code: 1

[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24759
Location: Prague, Czechia
You are not supposed to check for errors by parsing a session log file.

Please read documentation:
Martin Prikryl
[View user's profile]

Joined: 2013-08-20
Posts: 2
Location: United States
Were you able to make this work?

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!


About donations

$9   $19   $49   $99

About donations


WinSCP Privacy Policy

WinSCP License