Differences
This shows you the differences between the selected revisions of the page.
| 2015-08-10 | 2015-12-17 | ||
| missing slash as the and of target path (martin) | removing uses of option batch and confirm not needed since 5.6 with release of the next major branch 5.8 (martin) | ||
| Line 17: | Line 17: | ||
| ===== Commands ===== | ===== Commands ===== | ||
| To automate operation, you need to find out [[scripting#commands|commands]] necessary to implement it. For simple operations you need at least to: | To automate operation, you need to find out [[scripting#commands|commands]] necessary to implement it. For simple operations you need at least to: | ||
| - | * Set script to be performed non-interactively. For most automation scripts, you should use commands ''[[scriptcommand_option|option batch abort]]'' and ''[[scriptcommand_option|option confirm off]]''. | ||
| * Open session using ''[[scriptcommand_open|open]]'' command. | * Open session using ''[[scriptcommand_open|open]]'' command. | ||
| * 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]]. | ||
| Line 25: | Line 24: | ||
| <code winscp> | <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 | # 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" | 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" | ||
| Line 69: | Line 64: | ||
| <code winscp> | <code winscp> | ||
| - | option batch abort | ||
| - | option confirm off | ||
| open mysession | open mysession | ||
| put %1% | put %1% | ||
| Line 90: | Line 83: | ||
| <code batch> | <code batch> | ||
| rem Generate temporary script to upload %1 | rem Generate temporary script to upload %1 | ||
| - | echo option batch abort > script.tmp | ||
| - | echo option confirm off >> script.tmp | ||
| echo open mysession >> script.tmp | echo open mysession >> script.tmp | ||
| echo put %1 >> script.tmp | echo put %1 >> script.tmp | ||