cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: How can I get Directory listing with HTTP

From: Jochen Roderburg <Roderburg_at_uni-koeln.de>
Date: Tue, 18 May 2010 09:24:42 +0200

Zitat von Avinash <pavinash_at_gmail.com>:

> Yes right. Let me rephrase it.
> I want know the list of files that I can download using cURL when I give
> input an HTTP URL.
> I only want to download the list and not all files in order to know in prior
> the metadata like number of files, their sizes etc.
>
> Is there any way to do it using cURL/wget ?

Hi Avinash,

As people already pointed out here the HTTP protocol does not know the
concept of a "directory" or "file" and has therefore no feature to
request a "list of files" from a HTTP server.
You, your program (curl/wget/browser whatever) requests a URL, which
contains an arbitrary request string and the server sends back some
arbitrary data. If this reply happens to be "a list of files" it might
help you. If not there is nothing that the requesting program can do.

Best regards,
J. Roderburg

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2010-05-18