login about faq

Hi

I am trying to do this:

m_ftp.put_ListPattern(_T("*.accdb;*.mdb"));

But it won't work.

I can do:

m_ftp.put_ListPattern(_T("*.accdb"));
m_ftp.put_ListPattern(_T("*.mdb"));

But I really want all the files.

How should I set this? Thanks.

Andrew

asked Oct 20 '12 at 09:46

Andrew's gravatar image

Andrew
95611

edited Oct 20 '12 at 09:47


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 "*": http://www.cknotes.com/?p=427

And then do the pattern-matching yourself, for example by using http://msdn.microsoft.com/en-us/library/windows/desktop/bb773727%28v=vs.85%29.aspx

link

answered Oct 21 '12 at 04:01

Gert's gravatar image

Gert ♦
629141824

Hi

Interesting. I have never used MatchPathSpec before. I see there is also MatchPathSpecEx which supports multiple file types but it is not available for VS2005 it seems. I have used your suggestion for now.

(Oct 21 '12 at 10:10) Andrew

The ListPattern is what is passed to the FTP server in the "LIST" command. (See the FTP protocol RFC 959 at http://www.ietf.org/rfc/rfc959.txt )

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.

link

answered Oct 22 '12 at 09:08

chilkat's gravatar image

chilkat ♦♦
11.8k316358421

edited Oct 22 '12 at 09:09

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×1
×1

Asked: Oct 20 '12 at 09:46

Seen: 900 times

Last updated: Oct 22 '12 at 09:09

Related questions

powered by OSQA