cURL / Mailing Lists / curl-users / Single Mail

curl-users

Automated directory listing of mget for ftp - 7.15.1

From: Nick Harley <nickharley_at_bcbsal.org>
Date: Tue, 02 Jan 2007 12:22:39 -0600

I have a problem similar to this thread I found on the archives:

http://curl.haxx.se/mail/archive/0126.html

except I need to use ftp to retrieve these files. The problem is that
there is a string of six random numbers attached to the end of each
file. Wildcards don't seem to work, but I can use braces to get the
process going. I use a --url command like this to make that work:

--url ftp://<ip
address>/Results/20061227[0-9][0-9][0-9][0-9][0-9][0-9].asc

That means I have to run through a million (minus one) file
combinations to pick up all the files for that day. It's taking about
ten minutes to run through a thousand files. Is there a way in curl 7.15
(or later; I'd be willing to upgrade) to either do a mget command or
just return a directory listing? If I can get a dir or ls output, I can
script a sed to grab the filenames out and loop the curl command to pick
up all the files I need.

Thanks,
Nick
-----------------------------------------
CONFIDENTIALITY NOTICE
This e-mail is intended for the sole use of the individual(s) to
whom it is addressed, and may contain information that is
privileged, confidential and exempt from disclosure under
applicable law. You are hereby notified that any dissemination,
duplication, or distribution of this transmission by someone other
than the intended addressee or its designated agent is strictly
prohibited. If you receive this e-mail in error, please notify me
immediately by replying to this e-mail.
Received on 2007-01-03