Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

martin

What version of WinSCP are you using? Also do you use english or other version?
Guest

Hi Martin - many thanks for your quick response. It works perfectly now.

I had tried help option on the command line but abort wasnt listed in the available options - and it wasnt until we had some problems at the weekend that it became an issue

anyway - many thanks for all your help

:mrgreen:
martin

Re: how to exit script in batch automation

I guess that you are looking for:
option batch abort

See help.
pumauk

how to exit script in batch automation

Hi

in my batch, i need to exit the script if an error occurs. I know that if there is an error, the exit code = 1. My query (as a newbie to scripting) is how do i check the exit code and tell it what to do?

I have read your forum from top to bottom, and gone through your documentation and i cant figure it out.

My script is as follows

option batch on
open user:passwd@server
cd /home/dated directory
synchronize local 'server'
close
exit

if the dated directory is not present, i need to be able to automatically close the session (my error code is 2, response is 16). Normally, it would be something like if exit code = 1 exit but i cant get the syntax

many thanks for this great program