Differences
This shows you the differences between the selected revisions of the page.
2016-04-29 | 2016-06-30 | ||
error: prefix (martin) | explictly cast the $files to array, so that it is array even when there is a single file only, see t=23251 (martin) | ||
Line 33: | Line 33: | ||
# Retrieve list of files and sort them from larges to smallest | # Retrieve list of files and sort them from larges to smallest | ||
- | $files = | + | [array]$files = |
$session.ListDirectory($remotePath).Files | | $session.ListDirectory($remotePath).Files | | ||
Where-Object { -Not $_.IsDirectory } | | Where-Object { -Not $_.IsDirectory } | |