Differences
This shows you the differences between the selected revisions of the page.
2017-10-04 | 2017-10-11 | ||
unneeded escaping (martin) | adding variable to reduce code wrapping (martin) | ||
Line 20: | Line 20: | ||
# @description Searches for duplicate files on the server, starting from the current directory | # @description Searches for duplicate files on the server, starting from the current directory | ||
# @flag RemoteFiles | # @flag RemoteFiles | ||
- | # @version 5 | + | # @version 6 |
# @homepage https://winscp.net/eng/docs/library_example_find_duplicate_files | # @homepage https://winscp.net/eng/docs/library_example_find_duplicate_files | ||
# @require WinSCP 5.9.1 | # @require WinSCP 5.9.1 | ||
Line 68: | Line 68: | ||
{ | { | ||
Write-Host "Request checksum for file $remotePath..." | Write-Host "Request checksum for file $remotePath..." | ||
- | $checksum = | + | $buf = $session.CalculateFileChecksum($remoteChecksumAlg, $remotePath) |
- | ···············[System.BitConverter]::ToString($session.CalculateFileChecksum( | + | ···········$checksum = [System.BitConverter]::ToString($buf) |
- | $remoteChecksumAlg, $remotePath)) | + | |
Write-Host "File $remotePath checksum is $checksum" | Write-Host "File $remotePath checksum is $checksum" | ||
} | } |