commandline » Revisions »
Differences
This shows you the differences between the selected revisions of the page.
2020-12-03 | 2020-12-03 | ||
5.18 With SFTP protocol files can be streamed to stdout and from stdin in scripting (martin) | formatting (martin) | ||
Line 77: | Line 77: | ||
When using [[scripting]], use the ''[[scriptcommand_open|open]]'' command (and its switches) instead. | When using [[scripting]], use the ''[[scriptcommand_open|open]]'' command (and its switches) instead. | ||
+ | |||
+ | Examples: | ||
<code batch> | <code batch> | ||
Line 119: | Line 121: | ||
Use parameter ''/==nointeractiveinput=='', when feeding commands to ''[[executables|winscp.com]]'' using [[executables#redirection|standard input]], to make sure prompts for anything other than commands (such as password prompts) are cancelled. Also prevents error message popping up when fatal error occurs while starting WinSCP. When combined with ''/xmllog'' the fatal error is recorded in the %%XML%% log. | Use parameter ''/==nointeractiveinput=='', when feeding commands to ''[[executables|winscp.com]]'' using [[executables#redirection|standard input]], to make sure prompts for anything other than commands (such as password prompts) are cancelled. Also prevents error message popping up when fatal error occurs while starting WinSCP. When combined with ''/xmllog'' the fatal error is recorded in the %%XML%% log. | ||
- | <code batch> | + | Examples: <code batch> |
winscp.com /script="C:\Users\martin\Documents\myscript.txt" | winscp.com /script="C:\Users\martin\Documents\myscript.txt" | ||
winscp.com /command "open sftp://martin@example.com/ -hostkey=""ssh-rsa 2048 xxxx...=""" "exit" | winscp.com /command "open sftp://martin@example.com/ -hostkey=""ssh-rsa 2048 xxxx...=""" "exit" | ||
Line 144: | Line 146: | ||
It is recommended to escape the arguments with [[#syntax|// switch]]. | It is recommended to escape the arguments with [[#syntax|// switch]]. | ||
- | <code batch> | + | Example: <code batch> |
winscp.exe /defaults /synchronize // "C:\Users\martin\Documents\MySite" /home/martin/public_html | winscp.exe /defaults /synchronize // "C:\Users\martin\Documents\MySite" /home/martin/public_html | ||
</code> | </code> |