Differences

This shows you the differences between the selected revisions of the page.

2015-12-01 2015-12-16
Restored revision 1440527187. Undoing revision 1448974962. (martin) (hidden) removing recent tags with release of the next major branch 5.8 (martin)
Line 17: Line 17:
The script file must use UTF-8 encoding and must start with %%UTF-8%% BOM. The script file must use UTF-8 encoding and must start with %%UTF-8%% BOM.
-//Since WinSCP 5.7,// when running commands specified using ''/script'' or ''/command'', batch mode is used implicitly and overwrite confirmations are turned off. &recent (* Other articles referring to "option batch abort" are left intact until 5.7 is widespread *) In older releases and in an interactive scripting mode, the user is prompted in the same way as in GUI mode. To force batch mode (all prompts are automatically answered negatively) use the command ''[[scriptcommand_option|option batch abort]]''. For batch mode it is recommended to turn off confirmations using ''[[scriptcommand_option|option confirm off]]'' to allow overwrites (otherwise the [[ui_overwrite|overwrite confirmation prompt]] would be answered negatively, making overwrites impossible).+When running commands specified using ''/script'' or ''/command'', batch mode is used implicitly and overwrite confirmations are turned off. In an interactive scripting mode, the user is prompted in the same way as in GUI mode. To force batch mode (all prompts are automatically answered negatively) use the command ''[[scriptcommand_option|option batch abort]]''. For batch mode it is recommended to turn off confirmations using ''[[scriptcommand_option|option confirm off]]'' to allow overwrites (otherwise the [[ui_overwrite|overwrite confirmation prompt]] would be answered negatively, making overwrites impossible).
Multiple sessions can be opened simultaneously. Use the ''[[scriptcommand_session|session]]'' command to switch between them. Multiple sessions can be opened simultaneously. Use the ''[[scriptcommand_session|session]]'' command to switch between them.
Line 47: Line 47:
Note that when you are specifying commands on [[commandline|command-line]] using ''/command'', you need to surround each command by double-quote and [[commandline#syntax|escape the in-command double-quotes by doubling them]]. Note that when you are specifying commands on [[commandline|command-line]] using ''/command'', you need to surround each command by double-quote and [[commandline#syntax|escape the in-command double-quotes by doubling them]].
-To debug the quoting, enable session logging on level //Debug 1// (''/loglevel=1''). The log will show how WinSCP understands both your command-line and individual scripting commands. &recent_feature(5.7)+To debug the quoting, enable session logging on level //Debug 1// (''/loglevel=1''). The log will show how WinSCP understands both your command-line and individual scripting commands.
Line 71: Line 71:
To use ''%TIMESTAMP%'' on command-line in a batch file, you need to escape the ''%'' by doubling it to ''<nowiki>%%TIMESTAMP%%</nowiki>'', to avoid batch file interpreter trying to resolve the variable. To use ''%TIMESTAMP%'' on command-line in a batch file, you need to escape the ''%'' by doubling it to ''<nowiki>%%TIMESTAMP%%</nowiki>'', to avoid batch file interpreter trying to resolve the variable.
- 
-&recent_feature(5.7) 
==== [[arguments]] Script Arguments ==== ==== [[arguments]] Script Arguments ====

Last modified: by martin