Differences
This shows you the differences between the selected revisions of the page.
| 2019-03-27 | 2019-04-11 | ||
| 5.15 released - removing beta notices (martin) | 5.12 Extensions metadata can span multiple lines. (martin) | ||
| Line 15: | Line 15: | ||
| <code powershell - VerifyFileChecksum.ps1> | <code powershell - VerifyFileChecksum.ps1> | ||
| # @name Verify &Checksum | # @name Verify &Checksum | ||
| - | # @command powershell.exe -ExecutionPolicy Bypass -File "%EXTENSION_PATH%" -sessionUrl "!S" -localPath "!^!" -remotePath "!/!" -pause -sessionLogPath "%SessionLogPath%" | + | # @command powershell.exe -ExecutionPolicy Bypass -File "%EXTENSION_PATH%" ^ | 
| + | # -sessionUrl "!S" -localPath "!^!" -remotePath "!/!" -pause ^ | ||
| + | # -sessionLogPath "%SessionLogPath%" | ||
| # @description Compares checksums of the selected local and remote file | # @description Compares checksums of the selected local and remote file | ||
| # @flag RemoteFiles | # @flag RemoteFiles | ||
| - | # @version 4 | + | # @version 5 | 
| # @homepage ~~SELF~~ | # @homepage ~~SELF~~ | ||
| - | # @require WinSCP 5.8.4 | + | # @require WinSCP 5.12 | 
| # @option SessionLogPath -config sessionlogfile | # @option SessionLogPath -config sessionlogfile | ||
| # @optionspage ~~SELF~~#options | # @optionspage ~~SELF~~#options | ||
| Line 67: | Line 69: | ||
| # Calculate remote file checksum | # Calculate remote file checksum | ||
| - | $remoteChecksum = | + | $remoteChecksumBytes = $session.CalculateFileChecksum("sha-1", $remotePath) | 
| - | [System.BitConverter]::ToString($session.CalculateFileChecksum("sha-1", $remotePath)) | + | $remoteChecksum = [System.BitConverter]::ToString($remoteChecksumBytes) | 
| Write-Host $remoteChecksum | Write-Host $remoteChecksum | ||
| } | } | ||