Differences
This shows you the differences between the selected revisions of the page.
2013-04-03 | 2013-04-25 | ||
grammar (martin) | Sharing Configuration with Graphical Application (martin) | ||
Line 108: | Line 108: | ||
Note that the configuration also includes [[scripting#hostkey|verified SSH host keys]] and [[ftps#certificate|FTPS certificates]]. | Note that the configuration also includes [[scripting#hostkey|verified SSH host keys]] and [[ftps#certificate|FTPS certificates]]. | ||
+ | |||
+ | ===== [[configuration]] Sharing Configuration with Graphical Mode ===== | ||
+ | WinSCP in scripting/console mode shares [[config|configuration]] with [[interfaces|graphical mode]]. This can be both advantage and disadvantage. | ||
+ | |||
+ | Advantage is that you can use graphical interface to [[faq_script_ini|configure options for which there are no script commands]]. | ||
+ | |||
+ | Disadvantage is that change to configuration in graphical mode may break your script (common example is enabling //[[ui_synchronize|Existing files only]]// option for [[task_synchronize_full|synchronization]]). | ||
+ | |||
+ | If you want to protect your script from such inadvertent change, you should isolate its configuration from graphical mode explicitly. To do that [[config#export|export your configuration]] to a separate INI file and reference it using ''/ini='' [[commandline|command-line parameter]]. | ||
+ | |||
+ | An ideal situation is when you are able to configure all the options you need using script commands only (''[[scriptcommand_option|option]]'' command, switches of other commands, [[session_url|session URL]] and [[rawsettings|raw session settings]]). Then you can force scripting mode to start with the default configuration using ''/ini=nul'', avoiding need for the INI file. | ||
===== Example ===== | ===== Example ===== |