Command Line Switches

Top  Previous  Next

 

Several command line switches are available to enable optional behavior in Robo-FTP. These are arguments or parameters that may be included on the command line when launching the robo-ftp.exe program. Command line switches may be used from the command prompt or from batch files, VB Scripts, desktop shortcuts, the Windows Task Scheduler or whatever method you use to run Robo-FTP.

 

The supported method of running Robo-FTP from the command line is to add the program installation directory to the Path environment variable rather than using the full path to invoke robo-ftp.exe. This makes it  possible to install future versions in "side-by-side" mode and simply update the Path variable to control which version of Robo-FTP actually executes.  See "Adding Robo-FTP to the Path" for details.

 

The general command line syntax is:

 

robo-ftp [-asn] [-d] [-gfile] [-h] [-l] [-m] [-n] [-px arg] [-sfile] [-t] [-v] [-w] [&var1& | %var2%]

 

The following paragraphs describe these and other optional parameters in detail:

 

-a sn[+removal code]Activate license

 

The -a switch allows for automatic license activation. Normally activation is done manually from the Help menu. In cases where Robo-FTP is run hidden or is launched from another process, this may not be possible. When activating Robo-FTP for the first time include the serial number in the switch. For example:

 

 robo-ftp.exe a123456789012

 

When reactivating Robo-FTP include the serial number and removal code in the switch as shown below. Notice that the serial number and removal code are separated with a plus sign. Also there should be no spaces embedded in the removal code.

 

 robo-ftp.exe a123456789012+1234ABCD4567EFGH8901IJKL

 

If Robo-FTP is already activated then this switch is ignored.

 

-dDebug mode

 

The -d switch activates the debug mode. The debug mode writes internal debug information to the Trace Log file during script processing. This switch is only useful for diagnostics to be interpreted by a Robo-FTP technical support engineer.

 

-g fileGet import settings file

 

The -g switch specifies the optional settings file to be used to configure Robo-FTP. Settings files have a .set or .sar extension and are created by a previous run of Robo-FTP. The settings are read from the file and transferred to the Windows registry overwriting previously existing settings. If the settings file contains compressed items from the %installdir\ProgramData or the <My Documents>\Robo-FTP 3.X.folders those files will also be inflated and copied into the current installation. Typically settings would only need to be imported once. Also, refer to the EXPORT and IMPORT script commands for more information.

 

-h Run hidden

 

The -h switch results in Robo-FTP running completely invisible from the desktop.

 

-l Lock a minimized window

 

The -l switch may be specified with the -m switch to lock the minimized state of Robo-FTP and prevent a user from maximizing the window. This may be advantageous to prevent users from having access to the console window and its associated controls. This switch is ignored if the -m switch is not present.

 

-m Run minimized

 

The -m switch results in Robo-FTP starting with its console window minimized. This also hides the splash screen.

 

-nNo splash screen

 

The -n switch suppresses the Robo-FTP splash screen that is otherwise displayed when the program first loads.

 

-px argPass external values into the command script

 

Use of the -p switch is the preferred method to pass external arguments into Robo-FTP from a shortcut or the Windows Command Prompt command line. The value x must be the single digit 1 - 9. Therefore, up to nine arguments may be passed this way and are assigned to internally defined script file variables %1 through %9. The single space between x and arg is required.

 

The advantage to this method over the legacy method (see below) is that Windows environment variables (e.g., %SystemDrive%, %USERNAME%, etc.) as well as user defined strings may be passed into Robo-FTP. Consider this example where the name of a file to process is passed on the command line:

 

 robo-ftp.exe -p1 FridaySales.xls

 

The values could then be used by Robo-FTP as follows:

 

 SENDFILE %1

 

Remember to enclose strings with embedded spaces in quotation marks. You cannot mix multiple environment variables and/or environment variables and user strings in the same argument. Use of this method and the legacy method on the same command line is not recommended.

 

-s fileExecute script file

 

The -s switch specifies the script file to be loaded and executed. Pressing the (Esc) key or clicking the Stop button cancels script file execution.

 

-t [ id string ]Specify identification string for use with the Monitor applet

 

The -t switch specifies a string identifier used to identify this particular instance of Robo-FTP to Monitor (a Windows tray applet) provided with Robo-FTP that may be used to monitor the operation of Robo-FTP when it is running as a Windows service or when it is running minimized. For more information see Monitoring a Robo-FTP Service and the SRVNAME script command. See also installing services from the command line.

 

-v Running as Windows service

 

The -v switch disables the user interface; it is used by the Service Installer when running Robo-FTP as a service. You should use this switch when launching a new instance of Robo-FTP from a Robo-FTP service.

 

-w dir Specify the working directory

 

The -w switch specifies the working directory. For more information see the WORKINGDIR script command.

 

&sub-parm&

- or -

%sub-parm%Define Shortcut Target argument (legacy method)

 

Alternatively to the newer -p switch, arguments delimited by & or % are assigned to internally defined script file variables %1 through %9. There can be up to nine script file variables assigned in this way. Script file variable arguments must follow the last switch passed into Robo-FTP as shown below.

 

 robo-ftp.exe -n -sscript.s %var1% %var2%

 

 

It is also possible to return a numeric value back to the command line environment from which Robo-FTP was launched. This value is commonly known as a return code or errorlevel and can be set in script logic by the EXIT command. When the EXIT command is not used, the following values are returned when running Robo-FTP from the command line:

Value

Description

0

Success

-1

Robo-FTP licensing system failed.

-2

Maximum number of instances allowed have been launched.

 

 

Related command(s): EXEC, EXIT

See also: Configurator command line switches, Installing a service from the command line