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

Advertisement

abillon
Joined:
Posts:
11
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:
41,518
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:
11
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

Advertisement

Advertisement

You can post new topics in this forum