This is an old revision of the document!
option
Shows or sets value of script options.
Advertisement
Syntax
option [ <option> [ <value> ] ]
Remarks
If no parameters are specified, lists all script options and their values. When one parameter is specified only, shows value of the option. When two parameters are specified sets value of the option. Initial values of some options are taken from application configuration, however modifying the options does not change the application configuration.
Options are:
Option | Values and description |
---|---|
echo |
off|on Toggles echoing of command being executed. Commands affected: all |
batch |
off|on|abort|continue Enables batch mode. In batch mode, any choice prompt is automatically replied and any input prompt is cancelled (after short time interval). In batch mode, it is recommended to set confirm to off to allow overwrites. When batch mode is set to on any choice prompt is automatically replied negatively. Unless the prompt has different default answer (such as default “Reconnect” answer for reconnect prompt), in what case the default answer is used (after short time interval). See also reconnecttime option below. Value abort is like on . In addition, the script is aborted, when any script command fails or any choice prompt is replied with “Abort” answer (or similar). When set to continue any choice prompt is automatically replied with “Skip”, “Ignore” or similar answer. Enabling batch mode sets reconnect time ( reconnecttime option below) to 120 seconds, if it is not set yet (This feature is available only in the latest beta release.) Commands affected: nearly all |
confirm |
off|on Toggles confirmations (overwrite, etc.). Commands affected: get , put |
reconnecttime |
off | <sec> Sets time limit in seconds to try reconnecting broken sessions. Default value off removes any time limit. Reconnect time is set implicitly to 120 seconds, when batch mode ( batch option above) is enabled (This feature is available only in the latest beta release.) Commands affected: get , put , synchronize , keepuptodate |
failonnomatch |
off|on Toggles whether commands fail when file mask matches no files. Default value is off . This feature is available only in the latest beta release. Commands affected: get , put , rm , mv , chmod |
Note that resetting the same option overwrites a previous value, it does not append.
Advertisement
Examples
option batch
option confirm off
option
Converting to .NET Assembly
When converting script to .NET Assembly, map options as follows:
Options | Mapping |
---|---|
echo |
Irrelevant for .NET assembly. |
batch |
Read about mapping scripting modes to .NET assembly. |
confirm |
.NET asembly is non-interactive, so confirmations are always off. |
reconnecttime |
Set Session.ReconnectTime . |
failonnomatch |
No explicit mapping. To check if mask matches any file, you have to retrieve directory listing and search the listing for matching files. |
For example the following most common script option prologue does not need any mapping to .NET assembly, providing you follow instructions for mapping scripting modes to .NET assembly for individual batch operation commands.
option batch abort option confirm off