curl-library
Re: example code for using CURLOPT_WILDCARDMATCH for listing files in a directory?
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