Differences

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

2015-12-17 2015-12-21
removing uses of option batch and confirm not needed since 5.6 with release of the next major branch 5.8 (martin) 5.8 Change: Script file has to be in UTF-8 encoding. (martin)
Line 15: Line 15:
For automation, commands can be read from a script file specified by ''/script'' switch, passed from the command-line using the ''/command'' switch, or read from standard input of ''winscp.com''. For automation, commands can be read from a script file specified by ''/script'' switch, passed from the command-line using the ''/command'' switch, or read from standard input of ''winscp.com''.
-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 (//The BOM is not required by the latest beta version anymore//). &beta
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). 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).

Last modified: by martin