cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: multiple file retrieval

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Wed, 24 Oct 2001 16:36:26 +0200 (MET DST)

On Wed, 24 Oct 2001 luis.guzman_at_us.socgen.com wrote:

> We would like to create an automated process and use cURL to get an
> unknown range of files from an external FTP server. On the external FTP
> server, we won't know the names of the files or how many there are, all
> we would know would be the directory where the files would be located.
> I've read the documentation online and have found nothing pertaining to
> this. Can someone please lend a hand. Has this been accomplished
> before. Will it require libcurl. Please tell me there's an easier way
> ...

The tool curl is not meant to handle every possible scenario that involves
file transfers! ;-)

Like this case here. If you wanna use curl to do this for you, you should
probably write up a script that does:

 1. Get the contents of the FTP directory by running curl once.

 2. Get all those files in a second curl invoke.

Of course, if you instead decide to use libcurl through one of its many
interfaces, you could do both operations without having to disconnect between
them.

There are probably also other tools available for ftp directory downloads
that might be better suited.

-- 
    Daniel Stenberg -- curl groks URLs -- http://curl.haxx.se/
Received on 2001-10-24