Differences
This shows you the differences between the selected revisions of the page.
2016-06-07 | 2016-07-29 | ||
sessionlogfile alias (martin) | 5.9 stable released (martin) | ||
Line 1: | Line 1: | ||
====== Verify checksum of a remote file against a local file over SFTP/FTP protocol ====== | ====== Verify checksum of a remote file against a local file over SFTP/FTP protocol ====== | ||
- | The following example uses [[library|WinSCP .NET assembly]] from a [[library_powershell|PowerShell]] script. If you have another preferred language, you can easily translate it. | + | The following script uses [[library|WinSCP .NET assembly]] from a [[library_powershell|PowerShell]] script. If you have another preferred language, you can easily translate it. |
- | //In the latest beta version//, the example is distributed in WinSCP installer as a [[extension|WinSCP extension]]. &beta | + | The script is distributed in WinSCP installer as a [[extension|WinSCP extension]]. |
- | You can use the script (e.g. ''VerifyFileChecksum.ps1'') [[guide_custom_commands_automation|from WinSCP GUI as a local custom command]]: | + | To run the script manually use: |
<code batch> | <code batch> | ||
- | powershell.exe -File C:\path\VerifyFileChecksum.ps1 -sessionUrl "!S" -localPath "!^!" -remotePath "!/!" -pause | + | powershell.exe -File C:\path\VerifyFileChecksum.ps1 -localPath "C:\local\path\file.dat" -remotePath "/remote/path/file.dat" |
</code> | </code> | ||
- | Make sure you check //[[ui_customcommand|Use remote files]]// option. | + | //Note that calculation of a remote file checksum is supported with [[sftp|SFTP]] and [[ftp|FTP]] protocols only, subject to support of [[protocols|respective protocol extension]].// |
- | + | ||
- | //Note that calculation of remote file checksum is supported with [[sftp|SFTP]] and [[ftp|FTP]] protocols only, subject to support of [[protocols|respective protocol extension]].// | + | |
<code powershell - VerifyFileChecksum.ps1> | <code powershell - VerifyFileChecksum.ps1> |