GetFiles download only zip-Files

Advertisement

Thies
Guest

GetFiles download only zip-Files

Hello,
with my Powershell code I want to download zip files from a specific folder.
But the wildmask does not work. If I use "/fil/*" all files are downloaded

$sychronisationResult = $session.GetFiles(
        "/fil/*.zip",
        $workspace,
        $false,
        $transferOptions
    );   

When I check with this for $wildcards= "*.zip" I get the correct list:
$files =
            $session.EnumerateRemoteFiles(
                "/fil/", $wildcard, [WinSCP.EnumerationOptions]::None)
        write-host $files

What am I doing wrong?

Reply with quote

Advertisement

Advertisement

You can post new topics in this forum