Differences

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

2018-02-15 2018-02-19
old revision restored - it's not "My Documents" ever since Windows Vista (martin) double double-quotes in powershell (martin)
Line 202: Line 202:
                    <-          Script command 1          -> <-  Script command 2  ->                     <-          Script command 1          -> <-  Script command 2  ->
</code> </code>
 +
 +When executing such command from PowerShell, you additionally have to escape the doubled inner double-quotes with ''`'' (backtick) to prevent PowerShell from interpreting them on its own:
 +
 +<code batch>
 +winscp.com /command "open sftp://... -hostkey=`"`"ssh-rsa ...`"`"" "put `"`"C:\my file.dat`"`""
 +                    <-            Script command 1            -> <-    Script command 2    ->
 +</code>
 +
To debug the quoting, enable session logging on level //Debug 1// (''/loglevel=1''). The log will show how WinSCP understands your command-line. To debug the quoting, enable session logging on level //Debug 1// (''/loglevel=1''). The log will show how WinSCP understands your command-line.

Last modified: by martin – Currently locked by: 89.149.40.9