You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Rajesh Rajasekaran <ra...@gmail.com> on 2005/10/18 22:06:09 UTC

Download set of files under a directory on a HTTP server?

How do I download a set of files under a directory on a HTTP server using a
HTTP URL
pointing to that directory. ( no authentication required)

i tried the <get> task but i was able to download only one file at a time.

Thanks
Rajesh

Re: Download set of files under a directory on a HTTP server?

Posted by Dominique Devienne <dd...@gmail.com>.
On 10/18/05, Jeffrey E Care <ca...@us.ibm.com> wrote:
> HTTP is not a filesystem. Some webservers may be configured to present a
> filesystem-like view when a directory is selected, but that behavior is
> not part of the spec.
>
> You may be able to use wget to solve your problem, but in general the
> concept of "downloading a directory" simply doesn't exist in HTTP.

Right. I wonder though whether HttpClient has some "screen scraping"
code that extracts the 'directory listing' many web servers (i.e.
Apache) produce.

In any case, this would need custom coding to do the screen scraping
(which would be brittle) and then issue a <get> for each file to
download. --DD

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: Download set of files under a directory on a HTTP server?

Posted by Jeffrey E Care <ca...@us.ibm.com>.
HTTP is not a filesystem. Some webservers may be configured to present a 
filesystem-like view when a directory is selected, but that behavior is 
not part of the spec.

You may be able to use wget to solve your problem, but in general the 
concept of "downloading a directory" simply doesn't exist in HTTP.

JEC
-- 
Jeffrey E. Care (carej@us.ibm.com)
WebSphere v7 Release Engineer
WebSphere Build Tooling Lead (Project Mantis)


Rajesh Rajasekaran <ra...@gmail.com> wrote on 10/18/2005 04:06:09 PM:

> How do I download a set of files under a directory on a HTTP server 
using a
> HTTP URL
> pointing to that directory. ( no authentication required)
> 
> i tried the <get> task but i was able to download only one file at a 
time.
> 
> Thanks
> Rajesh