commandline » Revisions »
Differences
This shows you the differences between the selected revisions of the page.
2020-12-02 | 2020-12-03 | ||
config#no (martin) | 5.18 With SFTP protocol files can be streamed to stdout and from stdin in scripting (martin) | ||
Line 39: | Line 39: | ||
winscp.com [/script=script_file] [/command command1 command2 ...] | winscp.com [/script=script_file] [/command command1 command2 ...] | ||
[/parameter // param1 ...] | [/parameter // param1 ...] | ||
+ | winscp.com [/stdout[=binary|chunked]] [/stdin] | ||
winscp.com [/log=<logfile> [/loglevel=<level>] [/logsize=[<count>*]<size>]] | winscp.com [/log=<logfile> [/loglevel=<level>] [/logsize=[<count>*]<size>]] | ||
[/xmllog=<logfile> [/xmlgroups]] [/nointeractiveinput] | [/xmllog=<logfile> [/xmlgroups]] [/nointeractiveinput] | ||
Line 112: | Line 113: | ||
With ''[[executables|winscp.exe]]'', if ''/console'' parameter is not used along with ''/script'' or ''/command'', the script/command is executed without visual feedback (window). | With ''[[executables|winscp.exe]]'', if ''/console'' parameter is not used along with ''/script'' or ''/command'', the script/command is executed without visual feedback (window). | ||
- | 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 the parameter ''/==stdout=='' to enable streaming files to the standard output. When the parameter is used, the [[scriptcommand_get|''get'' command]] will stream the downloaded file(s) to the standard output, when ''-'' is used as a download target. By default (or with the ''binary'' flag), the files are streamed unmodified. With the ''chunked'' flag, the files are individually encoded using [[https://en.wikipedia.org/wiki/Chunked_transfer_encoding|Chunked transfer encoding]], what allows separating contents of multiple streamed files. When the parameter is used, all console output that would normally be printed to the standard output is redirected to the error output. &beta_feature |
+ | |||
+ | Use the parameter ''/==stdin=='' to enable streaming files from the standard input. When the parameter is used, the [[scriptcommand_get|''put'' command]] will stream the standard input to the remote server, when ''-'' is used as an upload source. Implies [[#nointeractiveinput|''/nointeractiveinput'']]. &beta_feature | ||
+ | |||
+ | 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> | <code batch> |