Differences

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

2014-07-21 2014-07-25
jscript not javascript (martin) script example (martin)
Line 19: Line 19:
  * Perform operation. For [[task_upload|uploads]] use ''[[scriptcommand_put|put]]'' command. For [[task_download|downloads]] use ''[[scriptcommand_get|get]]'' command. For [[task_synchronize_full|synchronization]] use ''[[scriptcommand_synchronize|synchronize]]'' command. For other operations, see [[scripting#commands|supported commands]].   * Perform operation. For [[task_upload|uploads]] use ''[[scriptcommand_put|put]]'' command. For [[task_download|downloads]] use ''[[scriptcommand_get|get]]'' command. For [[task_synchronize_full|synchronization]] use ''[[scriptcommand_synchronize|synchronize]]'' command. For other operations, see [[scripting#commands|supported commands]].
  * Exit scripting using ''[[scriptcommand_exit|exit]]'' command.   * Exit scripting using ''[[scriptcommand_exit|exit]]'' command.
 +
 +For example a typical script to upload a file is:
 +
 +<code winscp>
 +# Automatically abort script on errors
 +option batch abort
 +# Disable overwrite confirmations that conflict with the previous
 +option confirm off
 +# Connect to SFTP server using a password
 +open sftp://user:password@example.com/ -hostkey="ssh-rsa 2048 xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx"
 +# Upload file
 +put d:\examplefile.txt /home/user
 +# Disconnect
 +close
 +</code>
===== Script file ===== ===== Script file =====

Last modified: by martin