Differences
This shows you the differences between the selected revisions of the page.
library_example_recursive_download_custom_error_handling 2020-12-24 | library_example_recursive_download_custom_error_handling 2022-06-16 (current) | ||
Line 79: | Line 79: | ||
UserName = "user", | UserName = "user", | ||
Password = "mypassword", | Password = "mypassword", | ||
- | SshHostKeyFingerprint = "ssh-rsa 2048 xxxxxxxxxxx...=" | + | SshHostKeyFingerprint = "ssh-rsa 2048 xxxxxxxxxxx..." |
}; | }; | ||
Line 91: | Line 91: | ||
// Enumerate files and directories to download | // Enumerate files and directories to download | ||
+ | var opts = WinSCP.EnumerationOptions.EnumerateDirectories | | ||
+ | WinSCP.EnumerationOptions.AllDirectories; | ||
IEnumerable<RemoteFileInfo> fileInfos = | IEnumerable<RemoteFileInfo> fileInfos = | ||
- | session.EnumerateRemoteFiles( | + | session.EnumerateRemoteFiles(remotePath, null, opts); |
- | ························remotePath, null, | + | |
- | EnumerationOptions.EnumerateDirectories | | + | |
- | EnumerationOptions.AllDirectories); | + | |
foreach (RemoteFileInfo fileInfo in fileInfos) | foreach (RemoteFileInfo fileInfo in fileInfos) | ||
Line 148: | Line 147: | ||
# Use Generate Session URL function to obtain a value for -sessionUrl parameter. | # Use Generate Session URL function to obtain a value for -sessionUrl parameter. | ||
[Parameter(Mandatory = $True)] | [Parameter(Mandatory = $True)] | ||
- | $sessionUrl = "sftp://user:mypassword;fingerprint=ssh-rsa-xxxxxxxxxxx...=@example.com/", | + | $sessionUrl = "sftp://user:mypassword;fingerprint=ssh-rsa-xxxxxxxxxxx...@example.com/", |
[Parameter(Mandatory = $True)] | [Parameter(Mandatory = $True)] | ||
$remotePath, | $remotePath, |