Parallel transfers

Advertisement

grozni
Joined:
Posts:
3

Parallel transfers

Hi,

I'm trying to get this script running:
https://winscp.net/eng/docs/library_example_parallel_transfers#powershell

No matter what I put as fingerprint I can't get it running. I get wrong fingerprint if I use it in MD5 format which is I guess expected but in case of sha256 I'm getting Error:
Exception calling "ParseUrl" with "1" argument(s): "Root path can be specified for WebDAV and S3 protocols only.
Here are that example:
param (
    $sessionUrl = "sftp://user:pass;fingerprint=ssh-rsa-TS34ej2JO6rFNfKA4z0W+wZ7UOly5/yYKIUBr8u67XA=@1.1.1.1/",
    $remotePath = "/transfer/",
    $localPath = "C:\pb\doc",
    $batches = 3
)
 
try
{
    $assemblyFilePath = "WinSCPnet.dll"
    # Load WinSCP .NET assembly
    Add-Type -Path $assemblyFilePath
 
    # Setup session options
    $sessionOptions = New-Object WinSCP.SessionOptions
    $sessionOptions.ParseUrl($sessionUrl)
 
    $started = Get-Date
    # Plain variables cannot be modified in job threads
    $stats = @{
        count = 0
        bytes = [long]0
    }
 
    try
Can someone please assist on how to add hostkey to accept any fingerprint/host for that script? Thank you

Reply with quote

Advertisement

Advertisement

You can post new topics in this forum