commandline » Revisions »
Differences
This shows you the differences between the selected revisions of the page.
| 2009-04-17 | 2009-04-20 | ||
| executables (martin) | distinguish exe and com (martin) | ||
| Line 2: | Line 2: | ||
| ===== Parameters ===== | ===== Parameters ===== | ||
| + | Parameters for ''[[executables|winscp.exe]]'' executable: | ||
| <code> | <code> | ||
| winscp.exe stored_session | winscp.exe stored_session | ||
| winscp.exe [(sftp|ftp|scp)://][user[:password]@]host[:port][/path/[file]] | winscp.exe [(sftp|ftp|scp)://][user[:password]@]host[:port][/path/[file]] | ||
| - | winscp.exe [session] [/console] [/script=script_file] [/command command1 command2 ...] | ||
| winscp.exe [session] /synchronize [local_directory] [remote_directory] [/defaults] | winscp.exe [session] /synchronize [local_directory] [remote_directory] [/defaults] | ||
| winscp.exe [session] /keepuptodate [local_directory] [remote_directory] [/defaults] | winscp.exe [session] /keepuptodate [local_directory] [remote_directory] [/defaults] | ||
| winscp.exe [session] /upload file1 file2 file3 ... [/defaults] | winscp.exe [session] /upload file1 file2 file3 ... [/defaults] | ||
| winscp.exe [session] [/privatekey=<key_file>] [/hostkey=<fingerprint>] | winscp.exe [session] [/privatekey=<key_file>] [/hostkey=<fingerprint>] | ||
| + | winscp.exe [session] [/timeout=<sec>] [/passive] | ||
| + | winscp.exe [/console] [/script=script_file] [/command command1 command2 ...] | ||
| winscp.exe /ini=<inifile> /log=<logfile> | winscp.exe /ini=<inifile> /log=<logfile> | ||
| winscp.exe /update | winscp.exe /update | ||
| winscp.exe /help | winscp.exe /help | ||
| + | </code> | ||
| + | |||
| + | Parameters for ''[[executables|winscp.com]]'' executable: | ||
| + | <code> | ||
| + | winscp.com [/script=script_file] [/command command1 command2 ...] | ||
| + | winscp.com /ini=<inifile> /log=<logfile> | ||
| + | winscp.com /help | ||
| </code> | </code> | ||
| Line 22: | Line 31: | ||
| For security reasons, when protocol (''%%sftp://%%'', ''%%ftp://%%'' or ''%%scp://%%'') is provided on command line (possible execution from web browser/Windows Explorer), all command-like parameters that cause any automatic action are ignored, including ''/defaults'', ''/log'', ''/script'' and ''/command''. | For security reasons, when protocol (''%%sftp://%%'', ''%%ftp://%%'' or ''%%scp://%%'') is provided on command line (possible execution from web browser/Windows Explorer), all command-like parameters that cause any automatic action are ignored, including ''/defaults'', ''/log'', ''/script'' and ''/command''. | ||
| - | Parameter ''/privatekey'' specifies [[public_key#private|private key file]]. | + | Parameter ''/privatekey'' specifies [[public_key#private|private key file]]. You can use environment variables in the path, with syntax ''%NAME%''. |
| + | |||
| + | Parameter ''/timeout'' specifies [[ui_login_connection#server_response_timeout|server response timeout]]. | ||
| Parameter ''/hostkey'' specifies fingerprint of expected host key (or several fingerprints separated by semicolon). It makes WinSCP automatically [[ssh#verifying_the_host_key|accept hostkey]] with the fingerprint. | Parameter ''/hostkey'' specifies fingerprint of expected host key (or several fingerprints separated by semicolon). It makes WinSCP automatically [[ssh#verifying_the_host_key|accept hostkey]] with the fingerprint. | ||
| + | |||
| + | Parameter ''/passive'' enables [[ui_login_connection#passive_mode|passive mode]] (FTP protocol only). | ||
| When using [[scripting]], use ''[[script_commands#open|open]]'' command (and its switches) instead. This allows you settings [[script_commands#option|script options]] before starting session. | When using [[scripting]], use ''[[script_commands#open|open]]'' command (and its switches) instead. This allows you settings [[script_commands#option|script options]] before starting session. | ||
| Line 31: | Line 44: | ||
| ==== Console/scripting mode ==== | ==== Console/scripting mode ==== | ||
| - | Parameter ''/console'' executes WinSCP in [[scripting|console (scripting) mode]]. Note that when using ''[[executables|winscp.com]]'', the ''/console'' parameter is not necessary. | + | Parameter ''/console'' executes WinSCP in [[scripting|console (scripting) mode]]. Note that when using ''[[executables|winscp.com]]'', the console mode is implicit, so using ''/console'' parameter is redundant. |
| To run batch script either pass script file using ''/script'' parameter or specify the commands directly on command line using ''/command''. In the latter case each following parameter is treated as single command (If the command includes spaces, enclose it in quotes). | To run batch script either pass script file using ''/script'' parameter or specify the commands directly on command line using ''/command''. In the latter case each following parameter is treated as single command (If the command includes spaces, enclose it in quotes). | ||
| Line 37: | Line 50: | ||
| If both ''/script'' and ''/command'' parameters are used, commands from script file are executed first. When the last command is not ''[[script_commands#exit|exit]]'', regular non-batch mode follows. | If both ''/script'' and ''/command'' parameters are used, commands from script file are executed first. When the last command is not ''[[script_commands#exit|exit]]'', regular non-batch mode follows. | ||
| - | 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). |
| ==== Operations ==== | ==== Operations ==== | ||