Archived Forum Post

Index of archived forum posts


Using listPattern to filter files

Oct 22 '12 at 09:09


I am trying to do this:


But it won't work.

I can do:


But I really want all the files.

How should I set this? Thanks.



I guess the ftp component just doesn't support multiple wildcards. Also, I just read this and it seems to me it is better to leave listPattern at its default value of "*":

And then do the pattern-matching yourself, for example by using


The ListPattern is what is passed to the FTP server in the "LIST" command. (See the FTP protocol RFC 959 at )

FTP servers allow for wildcards in the LIST parameter, but nothing more complicated than a single wildcarded pattern using one more more asterisk characters, such as "*.txt". It's not possible to set ListPattern to something like "*.accdb;*.mdb" because the FTP server wouldn't know what to do with it. In addition, even if Chilkat parsed this out into several LIST commands to be sent separately, each LIST command is essentially a data transfer where the directory listing is returned on a separate data channel. It wouldn't be a simple internal code modification because Chilkat would need to send multiple LIST commands, collect the data from each, and merge the listings to eliminate duplicates.