Differences
This shows you the differences between the selected revisions of the page.
2018-02-20 | 2018-02-20 | ||
5.13 session path methods to remotepath class (martin) | code wrapping (martin) | ||
Line 74: | Line 74: | ||
$tempPath = (Join-Path $env:temp $fileInfo.Name) | $tempPath = (Join-Path $env:temp $fileInfo.Name) | ||
# Download file to temporary directory | # Download file to temporary directory | ||
- | $transferResult = | + | $filePath = [WinSCP.RemotePath]::EscapeFileMask($fileInfo.FullName) |
- | $session.GetFiles([WinSCP.RemotePath]::EscapeFileMask($fileInfo.FullName), $tempPath) | + | $transferResult = $session.GetFiles($filePath, $tempPath) |
# Did the download succeeded? | # Did the download succeeded? | ||
if (!$transferResult.IsSuccess) | if (!$transferResult.IsSuccess) |