Differences
This shows you the differences between the selected revisions of the page.
2016-02-23 | 2016-02-23 | ||
System.BitConverter (martin) | turning to an extension - directives + WINSCP_PATH (martin) | ||
Line 14: | Line 14: | ||
<code powershell - VerifyFileChecksum.ps1> | <code powershell - VerifyFileChecksum.ps1> | ||
+ | # @name Verify &Checksum | ||
+ | # @command powershell.exe -ExecutionPolicy Bypass -File "%EXTENSION_PATH%" -sessionUrl !S -localPath "!^!" -remotePath "!/!" -pause | ||
+ | # @flag RemoteFiles | ||
+ | # @version 1 | ||
+ | # @unknown blah | ||
+ | # @description Compares checksums of the selected local and remote file | ||
+ | |||
param ( | param ( | ||
# Use Generate URL function to obtain a value for -sessionUrl parameter. | # Use Generate URL function to obtain a value for -sessionUrl parameter. | ||
Line 37: | Line 44: | ||
# Load WinSCP .NET assembly | # Load WinSCP .NET assembly | ||
- | Add-Type -Path (Join-Path $PSScriptRoot "WinSCPnet.dll") | + | $assemblyPath = if ($env:WINSCP_PATH) { $env:WINSCP_PATH } else { $PSScriptRoot } |
+ | ····Add-Type -Path (Join-Path $assemblyPath "WinSCPnet.dll") | ||
# Setup session options | # Setup session options |