Differences
This shows you the differences between the selected revisions of the page.
2007-05-15 | 2007-05-15 | ||
no summary (24.205.39.123) (hidden) | old revision restored (martin) (hidden) | ||
Line 1: | Line 1: | ||
- | == ==**==== Scripting/Automation ====== | + | ====== Scripting/Automation ====== |
In addition to [[interfaces|graphical interface]], WinSCP offers scripting/console interface with many [[script_commands|commands]]. The commands can be typed in interactively, or read from script file or another source. | In addition to [[interfaces|graphical interface]], WinSCP offers scripting/console interface with many [[script_commands|commands]]. The commands can be typed in interactively, or read from script file or another source. | ||
Line 5: | Line 5: | ||
See [[commandline|command-line parameters]] to learn how to enter the console/scripting mode. | See [[commandline|command-line parameters]] to learn how to enter the console/scripting mode. | ||
- | For automation, commands can be read from a script file specified by ''/script'' switch, from standard input or passed from the command-line usi**ng the ''/command'' switch. | + | For automation, commands can be read from a script file specified by ''/script'' switch, from standard input or passed from the command-line using the ''/command'' switch. |
By default an interactive mode is used (the user is prompted in the same way as in GUI mode). To switch to a batch mode (all prompts are automatically answered negatively) use the command ''[[script_commands#option|option batch on]]''. For the batch mode it is recommended to turn off confirmations using ''[[script_commands#option|option confirm off]]'' to allow overwrites (otherwise the overwrite confirmation prompt would be answered negatively, making overwrites impossible). | By default an interactive mode is used (the user is prompted in the same way as in GUI mode). To switch to a batch mode (all prompts are automatically answered negatively) use the command ''[[script_commands#option|option batch on]]''. For the batch mode it is recommended to turn off confirmations using ''[[script_commands#option|option confirm off]]'' to allow overwrites (otherwise the overwrite confirmation prompt would be answered negatively, making overwrites impossible). | ||
- | Multiple sessions can be opened simultaneously. Use the ''[[script_commands#session|session]]'' command to switch between them. == | + | Multiple sessions can be opened simultaneously. Use the ''[[script_commands#session|session]]'' command to switch between them. |
Note that the first connection to an SSH server requires [[ssh#verifying_the_host_key|verification of the host key]], which cannot be automated by scripting. Therefore, some provision for accepting keys must be made prior to running the script to connect to a new host. Never attempt to make the script verify the host key automatically. | Note that the first connection to an SSH server requires [[ssh#verifying_the_host_key|verification of the host key]], which cannot be automated by scripting. Therefore, some provision for accepting keys must be made prior to running the script to connect to a new host. Never attempt to make the script verify the host key automatically. |