Differences
This shows you the differences between the selected revisions of the page.
2015-04-26 | 2015-05-12 | ||
Restored revision 1424335706. Undoing revisions 1430049990, 1430053279, 1430053496, 1430055284, 1430055397, 1430055712. (martin) (hidden) | mentioning rawconfig + prefer script/rawsettings/rawconfig over ini file (martin) | ||
Line 148: | Line 148: | ||
The 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]]). | The 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]]. | + | If you want to protect your script from such inadvertent change, you should isolate its configuration from graphical mode explicitly. |
- | + | ||
- | Also consider setting the INI file read-only, to prevent WinSCP writing to it, when exiting. Particularly, if you are running multiple scripts in parallel, to prevent different instances of WinSCP trying to write it at the same time. | + | |
- | + | ||
- | 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 site settings]]). Then you can force scripting mode to start with the default configuration using ''/ini=nul'', avoiding need for the INI file. | + | |
+ | The best way to do that is to configure all the options you need using script commands only (''[[scriptcommand_option|option]]'' command, switches of other commands, [[session_url|session URL]]), or if no such command is available, using [[rawsettings|raw site settings]] and [[rawconfig|raw configuration]]. Finally force scripting mode to start with the default configuration using ''/ini=nul'' [[commandline|command-line parameter]]. | ||
+ | Alternatively [[config#export|export your configuration]] to a separate INI file and reference it using ''/ini='' command-line parameter. Also consider setting the INI file read-only, to prevent WinSCP writing to it, when exiting. Particularly, if you are running multiple scripts in parallel, to prevent different instances of WinSCP trying to write it at the same time. | ||
===== Example ===== | ===== Example ===== |