.NET session.listDirectory + Mask/Filter

Advertisement

jfRoland
Guest

.NET session.listDirectory + Mask/Filter

Hi,

Is it possible to apply a mask when reading files in a directory when using WinSCP within VS2010

I have to search for files in directories that contains thousands of file. It is really slow if I can't put a filter on my search. (It is possible with WinSCP exe)

For example :

Dim directory As RemoteDirectoryInfo = session.ListDirectory("/export/org/backup/*ZZZ*o") to get all files in directory backup with filename containing ZZZ and ending with o

Thanks

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
40,476
Location:
Prague, Czechia

Re: .NET session.listDirectory + Mask/Filter

WinSCP does not support this. What protocol are you using? Note that most protocols, including FTP and SFTP, does not allow filtering anyway.

Reply with quote

jfRoland
Guest

Re: .NET session.listDirectory + Mask/Filter

I use Protocol.Sftp

I thought it exists because it seems to be implemented in WinScp application. In WinScp when you apply a filter before to select directory, it is so fast to get filtered files list that I thought it was filtering at the server level.

Thanks for your reply.

Reply with quote

martin
Site Admin
martin avatar

Re: .NET session.listDirectory + Mask/Filter

Are you referring to Filter function in WinSCP GUI? This is done on client side.

Reply with quote

Advertisement

You can post new topics in this forum