Differences
This shows you the differences between the selected revisions of the page.
library_example_moves_files_keeping_directory_structure 2019-09-24 | library_example_moves_files_keeping_directory_structure 2023-11-15 (current) | ||
Line 29: | Line 29: | ||
UserName = "user", | UserName = "user", | ||
Password = "mypassword", | Password = "mypassword", | ||
- | SshHostKeyFingerprint = "ssh-rsa 2048 xxxxxxxxxxx...=" | + | SshHostKeyFingerprint = "ssh-rsa 2048 xxxxxxxxxxx..." |
}; | }; | ||
Line 100: | Line 100: | ||
# 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, | ||
Line 202: | Line 202: | ||
===== [[download]] Download ===== | ===== [[download]] Download ===== | ||
- | For a download, you can use the code from the [[library_example_recursive_download_custom_error_handling#tree_download|Explicit Implementation of a File Tree Download section of Recursively download directory tree with custom error handling]] example. | + | For a download, you can use the code from the [[library_example_recursive_download_custom_error_handling#tree_download|Explicit implementation of a file tree download section of Recursively download directory tree with custom error handling]] example. |
Just pass a ''true'' to the optional ''[[library_session_getfiles#remove|remove]]'' parameter of the ''[[library_session_getfiles|Session.GetFiles]]''. | Just pass a ''true'' to the optional ''[[library_session_getfiles#remove|remove]]'' parameter of the ''[[library_session_getfiles|Session.GetFiles]]''. | ||
Line 209: | Line 209: | ||
<code csharp> | <code csharp> | ||
- | session.GetFiles(remoteFilePath, localFilePath, true); | + | session.GetFiles(remoteFilePath, localFilePath, true).Check(); |
</code> | </code> | ||
Line 215: | Line 215: | ||
<code powershell> | <code powershell> | ||
- | $session.GetFiles($remoteFilePath, $localFilePath, $True) | + | $session.GetFiles($remoteFilePath, $localFilePath, $True).Check() |
</code> | </code> |