FTP Protocol // Session.GetFiles with FileMask "| */" list all subdirectories

Advertisement

abillon
Joined:
Posts:
10
Location:
France

FTP Protocol // Session.GetFiles with FileMask "| */" list all subdirectories

Hello,

Session.GetFiles list all folders recursively even if the "| */" FileMask has been set in the TransferOptions object, see session log attached.

Is there a way to prevent this behaviour ?

transferOptions = New-Object WinSCP.TransferOptions
$transferOptions.TransferMode = [WinSCP.TransferMode]::Binary
$transferOptions.FileMask = "XYRSCXMLXYR*.err | */"
$transferResult = $session.GetFiles("/IN/*", "C:\EDI\scripts\tests\in\WINSCP\", $False, $transferOptions)

BR,

Alex

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
28,658
Location:
Prague, Czechia

Re: FTP Protocol // Session.GetFiles with FileMask "| */" list all subdirectories

I do not see any recursive folder listing in the log. Quite on the contrary:

. 2018-06-20 15:25:21.568 File "/IN/sub1" excluded from transfer
...
. 2018-06-20 15:25:21.568 File "/IN/sub2" excluded from transfer

Reply with quote

abillon
Joined:
Posts:
10
Location:
France

Sorry wrong log ... You will find attached the log.
As there are lots of subdirectories and files, there is a timeout.

I tried to reproduce the issue on a local server IIS and vsFTPd but couldn't.
Maybe my command in the original script is different but I can't see it myself.

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
28,658
Location:
Prague, Czechia

Re: FTP Protocol // Session.GetFiles with FileMask "| */" list all subdirectories

Thanks.

This bug has been added to the tracker:
https://winscp.net/tracker/1656

I'm sending you an email with a development version of WinSCP to the address you have used to register on this forum.

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
28,658
Location:
Prague, Czechia

abillon wrote:

Do you know when you will release 5.13.4 ?
Probably in about a month.

Reply with quote

Advertisement

You can post new topics in this forum