Differences
This shows you the differences between the selected revisions of the page.
2015-08-07 | 2015-12-17 | ||
ending path with slash is now forbidden (martin) | removing uses of option batch and confirm not needed since 5.6 with release of the next major branch 5.8 (martin) | ||
Line 68: | Line 68: | ||
| ''-neweronly'' | Not supported. Use ''[[library_session_synchronizedirectories|Session.SynchronizeDirectories]]'' instead. | | | ''-neweronly'' | Not supported. Use ''[[library_session_synchronizedirectories|Session.SynchronizeDirectories]]'' instead. | | ||
- | To emulate ''[[scriptcommand_option|option batch abort]]'' mode, call ''[[library_operationresultbase|TransferOperationResult.Check]]'' on method's result. See also [[library_session#results|Capturing results of operations]]. | + | To emulate the ([[scripting#using_scripting|default]]) ''[[scriptcommand_option|option batch abort]]'' mode, call ''[[library_operationresultbase|TransferOperationResult.Check]]'' on method's result. See also [[library_session#results|Capturing results of operations]]. |
For example, following script snippet: | For example, following script snippet: | ||
<code winscp> | <code winscp> | ||
- | option batch abort | ||
... | ... | ||
cd /home/martinp | cd /home/martinp | ||
Line 90: | Line 89: | ||
$transferOptions.ResumeSupport.State = [WinSCP.TransferResumeSupportState]::Off | $transferOptions.ResumeSupport.State = [WinSCP.TransferResumeSupportState]::Off | ||
# Absolute paths + $True for -delete + Two calls for two source parameters | # Absolute paths + $True for -delete + Two calls for two source parameters | ||
- | # + calling Check on result to emulate "option batch abort" | + | # + calling Check on result to emulate the (default) "option batch abort" |
$session.PutFiles("d:\*.txt", "/home/martinp/web/", $True, $transferOptions).Check() | $session.PutFiles("d:\*.txt", "/home/martinp/web/", $True, $transferOptions).Check() | ||
$session.PutFiles("d:\*.xml", "/home/martinp/web/", $True, $transferOptions).Check() | $session.PutFiles("d:\*.xml", "/home/martinp/web/", $True, $transferOptions).Check() | ||
</code> | </code> | ||