Topic "Efective Error Trapping"

Author Message
Arvada Joe
[View user's profile]

Joined: 2011-05-23
Posts: 2
Hi Prikryl,

I want to be able to see what my error is in a script. If I get an FTP connection I know the code is 0, if not it's 1.


Here is my simple bat file:

copy d:\ears_extracts\icr\out\*.csv
copy d:\ears_extracts\icr\out\*.csv d:\ears_extracts\icr\holding_area\*.csv
WinSCP.exe /console /script=abie.txt
del csp*.csv
del d:\ears_extracts\icr\out\*.csv


What would be an effective way to trap the error code so I can see what it is and put out a sucsess or failure message to a logfile?

Thanks
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
Please read documentation:
https://winscp.net/eng/docs/guide_automation#results
_________________
Martin Prikryl
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