commandline » Revisions »
Differences
This shows you the differences between the selected revisions of the page.
2023-05-24 | 2023-05-24 | ||
1 (94.158.246.232) (hidden) (untrusted) | 1 (94.158.246.232) (hidden) (untrusted) | ||
Line 1: | Line 1: | ||
====== Command-line Options ====== | ====== Command-line Options ====== | ||
- | |||
===== [[parameters]] Parameters ===== | ===== [[parameters]] Parameters ===== | ||
Parameters for ''[[executables|winscp.exe]]'' executable: | Parameters for ''[[executables|winscp.exe]]'' executable: | ||
- | &lt;code batch&gt; | + | <code batch> |
winscp.exe site|workspace|folder | winscp.exe site|workspace|folder | ||
- | winscp.exe &lt;session_url&gt;[/path/[file]] | + | winscp.exe <session_url>[/path/[file]] |
- | winscp.exe [mysession] [/sessionname=&lt;name&gt;] | + | winscp.exe [mysession] [/sessionname=<name>] |
winscp.exe [mysession] [/newinstance] | winscp.exe [mysession] [/newinstance] | ||
- | winscp.exe [mysession] /edit &lt;path&gt; | + | winscp.exe [mysession] /edit <path> |
- | winscp.exe [mysession] /browse[=&lt;file&gt;] | + | winscp.exe [mysession] /browse[=<file>] |
winscp.exe [mysession] /synchronize [local_directory] [remote_directory] [/defaults[=secs]] | winscp.exe [mysession] /synchronize [local_directory] [remote_directory] [/defaults[=secs]] | ||
winscp.exe [mysession] /keepuptodate [local_directory] [remote_directory] [/defaults[=secs]] | winscp.exe [mysession] /keepuptodate [local_directory] [remote_directory] [/defaults[=secs]] | ||
winscp.exe [mysession] /refresh [path] | winscp.exe [mysession] /refresh [path] | ||
winscp.exe [mysession] /upload file1 file2 file3 ... [/defaults[=secs]] | winscp.exe [mysession] /upload file1 file2 file3 ... [/defaults[=secs]] | ||
- | winscp.exe [mysession] [/privatekey=&lt;file&gt; [/passphrase=&lt;passphrase&gt;]] | + | winscp.exe [mysession] [/privatekey=<file> [/passphrase=<passphrase>]] |
- | winscp.exe [mysession] [/hostkey=&lt;fingerprint&gt;] | + | winscp.exe [mysession] [/hostkey=<fingerprint>] |
- | winscp.exe [mysession] [/username=&lt;user&gt;] [/password=&lt;pass&gt;] | + | winscp.exe [mysession] [/username=<user>] [/password=<pass>] |
winscp.exe [mysession] [/passwordsfromfiles] | winscp.exe [mysession] [/passwordsfromfiles] | ||
- | winscp.exe [mysession] [/clientcert=&lt;file&gt; [/passphrase=&lt;passphrase&gt;]] | + | winscp.exe [mysession] [/clientcert=<file> [/passphrase=<passphrase>]] |
- | winscp.exe [mysession] [/certificate=&lt;fingerprint&gt;] | + | winscp.exe [mysession] [/certificate=<fingerprint>] |
winscp.exe [mysession] [/passive[=on|off]] [/implicit|explicit] | winscp.exe [mysession] [/passive[=on|off]] [/implicit|explicit] | ||
- | winscp.exe [mysession] [/timeout=&lt;sec&gt;] | + | winscp.exe [mysession] [/timeout=<sec>] |
winscp.exe [mysession] [/rawsettings setting1=value1 setting2=value2 ...] | winscp.exe [mysession] [/rawsettings setting1=value1 setting2=value2 ...] | ||
- | winscp.exe [/console] [/script=&lt;script_file&gt;] [/command command1 command2 ...] | + | winscp.exe [/console] [/script=<script_file>] [/command command1 command2 ...] |
[/parameter // param1 ...] | [/parameter // param1 ...] | ||
- | winscp.exe [/log=&lt;logfile&gt; [/loglevel=&lt;level&gt;] [/logsize=[&lt;count&gt;*]&lt;size&gt;]] | + | winscp.exe [/log=<logfile> [/loglevel=<level>] [/logsize=[<count>*]<size>]] |
- | [/xmllog=&lt;logfile&gt; [/xmlgroups]] | + | [/xmllog=<logfile> [/xmlgroups]] |
- | winscp.exe [/ini=&lt;inifile&gt;] | + | winscp.exe [/ini=<inifile>] |
winscp.exe [/rawconfig config1=value1 config2=value2 ...] | winscp.exe [/rawconfig config1=value1 config2=value2 ...] | ||
winscp.exe [/rawtransfersettings setting1=value1 setting2=value2 ...] | winscp.exe [/rawtransfersettings setting1=value1 setting2=value2 ...] | ||
- | winscp.exe /batchsettings &lt;site_mask&gt; setting1=value1 setting2=value2 ... | + | winscp.exe /batchsettings <site_mask> setting1=value1 setting2=value2 ... |
- | winscp.exe /keygen keyfile [/output=&lt;file&gt;] [/changepassphrase] | + | winscp.exe /keygen keyfile [/output=<file>] [/changepassphrase] |
- | winscp.exe /keygen keyfile [/comment=&lt;text&gt;] [/certificate=&lt;file&gt;] | + | winscp.exe /keygen keyfile [/comment=<text>] [/certificate=<file>] |
winscp.exe /update | winscp.exe /update | ||
winscp.exe /info | winscp.exe /info | ||
winscp.exe /help | winscp.exe /help | ||
- | &lt;/code&gt; | + | </code> |
Parameters for ''[[executables|winscp.com]]'' executable: | Parameters for ''[[executables|winscp.com]]'' executable: | ||
- | &lt;code batch&gt; | + | <code batch> |
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 [/stdout[=binary|chunked]] [/stdin] | ||
- | winscp.com [/log=&lt;logfile&gt; [/loglevel=&lt;level&gt;] [/logsize=[&lt;count&gt;*]&lt;size&gt;]] | + | winscp.com [/log=<logfile> [/loglevel=<level>] [/logsize=[<count>*]<size>]] |
- | [/xmllog=&lt;logfile&gt; [/xmlgroups]] [/nointeractiveinput] | + | [/xmllog=<logfile> [/xmlgroups]] [/nointeractiveinput] |
- | winscp.com [/ini=&lt;inifile&gt;] | + | winscp.com [/ini=<inifile>] |
winscp.com [/rawconfig config1=value1 config2=value2 ...] | winscp.com [/rawconfig config1=value1 config2=value2 ...] | ||
- | winscp.com /batchsettings &lt;site_mask&gt; setting1=value1 setting2=value2 ... | + | winscp.com /batchsettings <site_mask> setting1=value1 setting2=value2 ... |
- | winscp.com /keygen keyfile [/output=&lt;file&gt;] [/changepassphrase] | + | winscp.com /keygen keyfile [/output=<file>] [/changepassphrase] |
- | winscp.com /keygen keyfile [/comment=&lt;text&gt;] [/certificate=&lt;file&gt;] | + | winscp.com /keygen keyfile [/comment=<text>] [/certificate=<file>] |
winscp.com /info | winscp.com /info | ||
winscp.com /help | winscp.com /help | ||
- | &lt;/code&gt; | + | </code> |
==== [[session]] Session ==== | ==== [[session]] Session ==== | ||
- | The first syntax opens the [[session_configuration#site|site]]. To open site, stored in folder, use path syntax "folder/site". You can also open [[workspace|workspace]] or all sites in site folder. | + | The first syntax opens the [[session_configuration#site|site]]. To open site, stored in folder, use path syntax &quot;folder/site&quot;. You can also open [[workspace|workspace]] or all sites in site folder. |
The second creates the session specified by [[session_url|session URL]] and optionally by initial remote path. If the remote path is not ended by slash (''/''), it is treated as path to file (or even directory) that should be [[task_download#url|downloaded]]. | The second creates the session specified by [[session_url|session URL]] and optionally by initial remote path. If the remote path is not ended by slash (''/''), it is treated as path to file (or even directory) that should be [[task_download#url|downloaded]]. | ||
Line 70: | Line 70: | ||
You can use the parameters ''/==username=='' and ''/password'' as an alternative way to specify the credentials. The credentials are normally part of the [[session_url|session URL]]. Using these switches has the advantage of not needing to [[session_url#special|URL-encode special characters]]. The password [[#passwordsfromfiles|can be read from a file]]. | You can use the parameters ''/==username=='' and ''/password'' as an alternative way to specify the credentials. The credentials are normally part of the [[session_url|session URL]]. Using these switches has the advantage of not needing to [[session_url#special|URL-encode special characters]]. The password [[#passwordsfromfiles|can be read from a file]]. | ||
- | With parameter ''/==passwordsfromfiles=='', the values of [[#username|''/password'']], [[#privatekey|''/passphrase'']] and in general all passwords from all sources are interpreted as paths to files, where the actual passwords are read from. The files must use UTF-8 or UTF-16 encoding.((With UTF-8 encoding use of BOM is optional. With UTF-16 the BOM is mandatory. Only the first line of the file is considered. Use of more lines is reserved for the future.)) &beta_feature | + | With parameter ''/==passwordsfromfiles=='', the values of [[#username|''/password'']], [[#privatekey|''/passphrase'']] and in general all passwords from all sources are interpreted as paths to files, where the actual passwords are read from. The files must use UTF-8 or UTF-16 encoding.((With UTF-8 encoding use of BOM is optional. With UTF-16 the BOM is mandatory. Only the first line of the file is considered. Use of more lines is reserved for the future.)) &amp;beta_feature |
The parameter ''/clientcert'' specifies a [[local_path|local path]] to FTPS or WebDAVS [[tls#client_certificate|TLS/SSL client certificate]]. If the certificate is encrypted, use the ''/passphrase'' to specify its passphrase. | The parameter ''/clientcert'' specifies a [[local_path|local path]] to FTPS or WebDAVS [[tls#client_certificate|TLS/SSL client certificate]]. If the certificate is encrypted, use the ''/passphrase'' to specify its passphrase. | ||
Line 88: | Line 88: | ||
Examples: | Examples: | ||
- | <code batch> | + | &lt;code batch&gt; |
- | winscp.exe "My site" | + | winscp.exe &quot;My site&quot; |
- | winscp.exe sftp://martin:password@example.com/ /hostkey="ssh-rsa 2048 xxxxxxxxxxx..." | + | winscp.exe sftp://martin:password@example.com/ /hostkey=&quot;ssh-rsa 2048 xxxxxxxxxxx...&quot; |
winscp.exe scp://test@example.com:2222/ /privatekey=mykey.ppk | winscp.exe scp://test@example.com:2222/ /privatekey=mykey.ppk | ||
winscp.exe ftps://martin:password@example.com/ | winscp.exe ftps://martin:password@example.com/ | ||
- | </code> | + | &lt;/code&gt; |
==== [[logging]] Logging ==== | ==== [[logging]] Logging ==== |