using file masks in SFTPClient

Discussion of open issues, suggestions and bugs regarding network security and data protection solution - SecureBridge
Post Reply
mpsuer
Posts: 3
Joined: Thu 15 Aug 2013 13:16

using file masks in SFTPClient

Post by mpsuer » Mon 05 Feb 2018 17:08

Hi,

ist it possible to use a filemask when requesting a directory content with the sftpclient component or do I have to read a whole directory and do the filtering for the filenames which I want to use by myself?

Code: Select all

// this works as expected
dirHandle := ScSFTPClient.OpenDirectory('/');

// providing a filter mask doesn't work
dirHandle := ScSFTPClient.OpenDirectory('/x12*.txt');
kind regards
Martin

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: using file masks in SFTPClient

Post by ViktorV » Wed 07 Feb 2018 10:38

SFTP protocol does not allow using a mask to read the required files. To solve your task, you should use the TScSFTPClient.OnDirectoryList event handler. You can get a sample of how to use it on our forum: viewtopic.php?t=34304. If after getting acquainted, you have any specific questions left, or if new ones arise, please ask and we will answer them.

Post Reply