Differences
This shows you the differences between the selected revisions of the page.
| 2008-11-01 | 2009-01-30 | ||
| Restored revision 1211482489. Undoing revision 1225481402. (martin) (hidden) | avoid opening session from command line, /command example (martin) | ||
| Line 94: | Line 94: | ||
| </code> | </code> | ||
| - | Instead of using ''open'' command you can also open a session using a [[commandline|command-line parameter]]. | + | For simple scripts you can specify all the commands on [[commandline|command-line]] using ''/command'' switch: |
| + | <code> | ||
| + | winscp.exe /console /command "option batch on" "open user@example.com" "get examplefile.txt d:\" "exit" | ||
| + | </code> | ||
| + | |||
| + | Instead of using ''open'' command you can also open a session using a [[commandline|command-line parameter]]. Note that in that case session is opened yet before script starts. Particularly ''option'' commands do not apply yet. Generally you should avoid using this method. | ||
| <code> | <code> | ||
| winscp.exe /console /script=example.txt user@example.com | winscp.exe /console /script=example.txt user@example.com | ||