EXIT        Terminate Robo-FTP

<< Click to Display Table of Contents >>

Navigation:  Robo-FTP User's Guide > Script Programming > Script Commands > All Script Commands >

EXIT        Terminate Robo-FTP

Syntax:

EXIT

[ /options ]

Arguments:

None

 

Options:

/exitcode=nn

Define exit code value for Robo-FTP. Depending on the platform this value may also be referred to as an Exit Status or errorlevel. You can use this value to indicate success or failure to the process that launched Robo-FTP.

 

/forced

Exit even if line is connected.

 

 

This script command ends script processing and terminates Robo-FTP. The action is the same as clicking the Exit button on the Robo-FTP toolbar or pressing the Alt-F4 key.

 

Using the EXIT command in a script that is being run as a service will stop the service, however the service will still be defined. To complete the removal of the service from the Windows Service Manager you must also stop the service with the Robo-FTP Service Installer or Enterprise Dashboard.  If you wish to design your service so that it can be stopped cleanly on demand, see Shutting Down a Robo-FTP Service.

 

Caution

Be careful when scripts are run as the result of CRON or CALL commands, that you really mean EXIT before calling EXIT. To exit a script without causing Robo-FTP to exit use the RETURN command.

 

EXIT does not work on the COM interface; use RoboEndSession() instead.

 

The /exitcode=nn option allows you to define the program exit code passed back to the operating system or calling process. A zero traditionally indicates success and a 1 reports failure but some systems use different numbers to indicate different types of failures or higher numbers to indicate more severe failures.

 

The /forced option performs a forced quit that terminates any I/O in progress and disconnects the line prior to exiting.

 

 

Related command(s): BREAK, RETURN, STOP

See also: Returning Error Codes from Scripts