Differences

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

2013-08-13 2013-10-10
no summary (208.80.29.41) using Users instead of Documents and Settings in examples (martin)
Line 76: Line 76:
<code> <code>
-winscp.com /script="C:\Documents and Settings\martin\Documents\myscript.txt"+winscp.com /script="C:\Users\martin\Documents\myscript.txt"
winscp.com /command "open ""My session"" -hostkey=""ssh-rsa 1024 xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx""" winscp.com /command "open ""My session"" -hostkey=""ssh-rsa 1024 xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx"""
-winscp.com /command "open ""My session""" "put ""C:\Documents and Settings\martin\Documents\myfile.dat"""+winscp.com /command "open ""My session""" "put ""C:\Users\martin\Documents\myfile.dat"""
winscp.exe /console /script="myscript.txt" winscp.exe /console /script="myscript.txt"
</code> </code>
Line 94: Line 94:
<code> <code>
-winscp.exe /defaults /synchronize // "C:\Documents and Settings\martin\Documents\MySite" /home/martin/public_html+winscp.exe /defaults /synchronize // "C:\Users\martin\Documents\MySite" /home/martin/public_html
</code> </code>
Line 101: Line 101:
<code> <code>
-winscp.exe /ini="C:\Documents and Settings\martin\Documents\myconfig.ini"+winscp.exe /ini="C:\Users\martin\Documents\myconfig.ini"
</code> </code>
Line 114: Line 114:
Command-line parameters that include space(s) must be surrounded by double-quotes: Command-line parameters that include space(s) must be surrounded by double-quotes:
<code> <code>
-winscp.exe /ini="C:\Documents and Settings\martin\Documents\myconfig.ini"+winscp.exe /ini="C:\Users\martin\Documents\myconfig.ini"
</code> </code>
To use the double-quote as a literal, use two double-quotes sequentially. For example, the ''/command'' expects that each script commands is surrounded by double quotes so that is passed as a single command-line argument. In addition, any script command argument that includes spaces is expected to be surrounded by double-quotes within the command (see [[scripting#syntax|doubling double-quotes]]): To use the double-quote as a literal, use two double-quotes sequentially. For example, the ''/command'' expects that each script commands is surrounded by double quotes so that is passed as a single command-line argument. In addition, any script command argument that includes spaces is expected to be surrounded by double-quotes within the command (see [[scripting#syntax|doubling double-quotes]]):
<code> <code>
-winscp.com /command "open ""My session""" "put ""C:\Documents and Settings\martin\Documents\myfile.dat"""+winscp.com /command "open ""My session""" "put ""C:\Users\martin\Documents\myfile.dat"""
                    <-  script cmd 1  -> <-                    script cmd 2                          ->                     <-  script cmd 1  -> <-                    script cmd 2                          ->
</code> </code>
Line 125: Line 125:
An argument that begins with a slash is considered a switch. To pass a parameter that itself starts with the slash in its syntax (i.e. a remote path like ''/root''), use the special switch ''%%//%%'' (two slashes) before the argument. The switch ''%%//%%'' denotes that all following arguments are not switches. Example: An argument that begins with a slash is considered a switch. To pass a parameter that itself starts with the slash in its syntax (i.e. a remote path like ''/root''), use the special switch ''%%//%%'' (two slashes) before the argument. The switch ''%%//%%'' denotes that all following arguments are not switches. Example:
<code> <code>
-winscp.exe /synchronize // "C:\Documents and Settings\martin\Documents\MySite" /root+winscp.exe /synchronize // "C:\Users\martin\Documents\MySite" /root
</code> </code>

Last modified: by martin