Differences

This shows you the differences between the selected revisions of the page.

2017-10-03 2017-10-03
mistake (martin) code wrapping for new design (martin)
Line 68: Line 68:
        {         {
            Write-Host "Request checksum for file $remotePath..."             Write-Host "Request checksum for file $remotePath..."
-            $checksum = [System.BitConverter]::ToString($session.CalculateFileChecksum($remoteChecksumAlg, $remotePath))+            $checksum = 
 + ···············[System.BitConverter]::ToString($session.CalculateFileChecksum( 
 +····················$remoteChecksumAlg, $remotePath))
            Write-Host "File $remotePath checksum is $checksum"             Write-Host "File $remotePath checksum is $checksum"
        }         }
Line 108: Line 110:
        $sha1 = [System.Security.Cryptography.SHA1]::Create()         $sha1 = [System.Security.Cryptography.SHA1]::Create()
-        $files = $session.EnumerateRemoteFiles($remotePath, "*", [WinSCP.EnumerationOptions]::AllDirectories)+        $files = 
 + ···········$session.EnumerateRemoteFiles( 
 +················$remotePath, "*", [WinSCP.EnumerationOptions]::AllDirectories)
        foreach ($fileInfo in $files)         foreach ($fileInfo in $files)
Line 124: Line 128:
                    if ($checksum -eq $otherChecksum)                     if ($checksum -eq $otherChecksum)
                    {                     {
-                        Write-Host "Checksums of files $($fileInfo.FullName) and $($otherFilePath) are identical"+                        Write-Host
 +····························"Checksums of files $($fileInfo.FullName) and " + 
 +                            "$($otherFilePath) are identical")
                        $duplicates[$fileInfo.FullName] = $otherFilePath                         $duplicates[$fileInfo.FullName] = $otherFilePath
                    }                     }

Last modified: by martin