Differences

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

library_example_find_duplicate_files 2019-05-27 library_example_find_duplicate_files 2022-06-16 (current)
Line 12: Line 12:
<code batch> <code batch>
-powershell.exe -File C:\path\FindDuplicates.ps1 -sessionUrl "sftp://username:password@example.com/" -remotePath "/path" -remoteChecksumAlg sha-1+powershell.exe -File C:\path\FindDuplicates.ps1 -sessionUrl "sftp://user:password;fingerprint=ssh-rsa-xxxxxxxxxxx...@example.com/" -remotePath "/path" -remoteChecksumAlg sha-1
</code> </code>
Line 18: Line 18:
# @name        Find &Duplicates... # @name        Find &Duplicates...
# @command      powershell.exe -ExecutionPolicy Bypass -File "%EXTENSION_PATH%" ^ # @command      powershell.exe -ExecutionPolicy Bypass -File "%EXTENSION_PATH%" ^
-#                  -sessionUrl "!S" -remotePath "!/" -pause ^+#                  -sessionUrl "!E" -remotePath "!/" -pause ^
#                  -remoteChecksumAlg "%RemoteChecksumAlg%" -sessionLogPath "%SessionLogPath%" #                  -remoteChecksumAlg "%RemoteChecksumAlg%" -sessionLogPath "%SessionLogPath%"
# @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      7 +# @version      8 
-# @homepage    https://winscp.net/eng/docs/library_example_find_duplicate_files +# @homepage    ~~SELF~~ 
-# @require      WinSCP 5.12+# @require      WinSCP 5.16
# @option      RemoteChecksumAlg -config -run combobox "&Checksum:" "local" ^ # @option      RemoteChecksumAlg -config -run combobox "&Checksum:" "local" ^
#                  "local=Local sha-1" "sha1=Remote sha-1" "sha256=Remote sha-256" ^ #                  "local=Local sha-1" "sha1=Remote sha-1" "sha256=Remote sha-256" ^
#                  "md5=Remote md5" #                  "md5=Remote md5"
# @option      SessionLogPath -config sessionlogfile # @option      SessionLogPath -config sessionlogfile
-# @optionspage  https://winscp.net/eng/docs/library_example_find_duplicate_files#options+# @optionspage  ~~SELF~~#options
param ( param (
    # Use Generate Session URL function to obtain a value for -sessionUrl parameter.     # Use Generate Session URL function to obtain a value for -sessionUrl parameter.
-    $sessionUrl = "sftp://user:mypassword;fingerprint=ssh-rsa-xxxxxxxxxxx...=@example.com/",+    $sessionUrl = "sftp://user:mypassword;fingerprint=ssh-rsa-xxxxxxxxxxx...@example.com/",
    [Parameter(Mandatory = $True)]     [Parameter(Mandatory = $True)]
    $remotePath,     $remotePath,
Line 65: Line 65:
            else             else
            {             {
-                Write-Host "Error downloading file ${remotePath}: $($transferResult.Failures[0])"+                Write-Host
 +····················"Error downloading file ${remotePath}: $($transferResult.Failures[0])")
                $checksum = $False                 $checksum = $False
            }             }

Last modified: by martin