Differences
This shows you the differences between the selected revisions of the page.
2015-12-17 | 2015-12-17 | ||
removing uses of option batch and confirm not needed since 5.6 with release of the next major branch 5.8 (martin) | removing uses of option batch and confirm not needed since 5.6 with release of the next major branch 5.8 II (martin) | ||
Line 52: | Line 52: | ||
<code winscp> | <code winscp> | ||
- | # Automatically abort script on errors | ||
- | option batch abort | ||
- | # Disable overwrite confirmations that conflict with the previous | ||
- | option confirm off | ||
# Connect | # Connect | ||
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 101: | Line 97: | ||
$transferResult = $session.GetFiles("/home/user/examplefile.txt", "d:\", $False, $transferOptions) | $transferResult = $session.GetFiles("/home/user/examplefile.txt", "d:\", $False, $transferOptions) | ||
- | # Throw on any error to emulate "option batch abort" | + | # Throw on any error to emulate the default "option batch abort" |
$transferResult.Check() | $transferResult.Check() | ||
} | } |