Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

Thies

Solved the issue. I missed a "\" in my variable for $workspace.
can be deleted.
Thies

I am using WinSCP.exe version 5.13.1.8265 and its WINSCPnet.dell
Thies

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?