cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-library Mailing List Archives

Re: example code for using CURLOPT_WILDCARDMATCH for listing files in a directory?

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Wed, 20 Oct 2010 13:34:25 -0700

On Wed, Oct 20, 2010 at 12:47:11PM -0700, John Utz wrote:
> ftp-wildcard.c seems to be about downloading files based on a wildcard match.
>
> i wish to simply *list* files in a directory so that i can figure out which one
> i should download.
>
> Based on my reading of the docs, CURLOPT_DIRLISTONLY and CURLOPT_WILDCARDMATC
> are mutually incompatible.
>
> So how can i perform the act that i am interested in?

What you want is a server-specific. But many servers use * as a wildcard, so
you can send a 'LIST wild*' or 'NLST wild*' and those servers will return
just those file names.

>>> Dan
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2010-10-20

These mail archives are generated by hypermail.

donate! Page updated November 12, 2010.
web site info

File upload with ASP.NET