Menu  Toggle search  [ ![](https://winscp-
static-746341.c.cdn77.org/assets/images/logos/logo.png?v=7032) WinSCP  Free
SFTP, SCP, S3 and FTP client  for  Windows  ](https://winscp.net/)

  * [ Home ](/eng/index.php)
  * [ News ](/eng/news.php)
  * [ Introduction ](/eng/docs/introduction)
  * [ Download ](/eng/download.php)
  * [ Install ](/eng/docs/guide_install)
  * [ Documentation ](/eng/docs/)
  * [ Forum ](/forum/)

Close

Search

Close

[ Documentation ](/eng/docs/start "Documentation") » [ Features
](/eng/docs/feature_index "Features") » [ Scripting ](/eng/docs/scripting
"Scripting") » [ Script Commands ](/eng/docs/scripting#commands "Script
Commands") »

#  option command

Shows or sets value of script options.

  * Syntax 
  * Remarks 
  * Examples 
  * Converting to .NET Assembly 

_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.

The default values shown below are defaults for the application. The initial
values of some options can be different, if you [ share configuration with
graphical mode ](/eng/docs/scripting#configuration) .

Options are:

Option  |  Values and description   
---|---  
` echo ` |  ` off|on `   
Toggles echoing of command being executed.  
Commands affected: all  
Default: ` off `  
` 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 a different default answer (such as a
default “Reconnect” answer for a reconnect prompt), in what case the default
answer is used (after a short time interval). See also a ` 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.  
Commands affected: nearly all  
Default: ` abort ` for commands specified using ` [ /script
](/eng/docs/commandline#scripting) ` or ` [ /command
](/eng/docs/commandline#scripting) ` ; ` off ` for commands specified on
input.  
` confirm ` |  ` off|on `   
Toggles confirmations (overwrite, etc.).  
Commands affected: ` [ get ](/eng/docs/scriptcommand_get) ` , ` [ put
](/eng/docs/scriptcommand_put) `  
Default: ` off ` for commands specified using ` [ /script
](/eng/docs/commandline#scripting) ` or ` [ /command
](/eng/docs/commandline#scripting) ` ; ` on ` for commands specified on input.  
` reconnecttime ` |  ` off | <sec> `   
Sets time limit in seconds to try reconnecting broken sessions. Value ` off `
removes any time limit.  
Reconnect time is set implicitly to 120 seconds, when batch mode ( ` batch  `
option above) is enabled.  
Commands affected: ` [ get ](/eng/docs/scriptcommand_get) ` , ` [ put
](/eng/docs/scriptcommand_put) ` , ` [ synchronize
](/eng/docs/scriptcommand_synchronize) ` , ` [ keepuptodate
](/eng/docs/scriptcommand_keepuptodate) `  
Default: ` off `  
` failonnomatch ` |  ` off|on `   
Toggles whether commands fail when a [ wildcard ](/eng/docs/file_mask) used to
select files for an operation matches no files or when directory
synchronization does not find any difference.  
Commands affected: ` [ get ](/eng/docs/scriptcommand_get) ` , ` [ put
](/eng/docs/scriptcommand_put) ` , ` [ rm ](/eng/docs/scriptcommand_rm) ` , `
[ mv ](/eng/docs/scriptcommand_mv) ` , ` [ chmod
](/eng/docs/scriptcomman