Nice little problem.... 
Author Message
 Nice little problem....

Hmm I clould use some help or some good links for this problem!
What I want to do is to copy all files (.html) from a given directory on a
webserver. Could look like this.
www.madeup.com/getall/files/
The problem is that I dont know the names of the files!
Is there any way to get a HTTP:Request to act simillar to the opendir()
function.

Or is there any other good way to do this.
Copy all files from a webserver when I dont know the name of the files.

Thnx
Rickard



Fri, 13 Sep 2002 03:00:00 GMT  
 Nice little problem....

Quote:

> Hmm I clould use some help or some good links for this problem!
> What I want to do is to copy all files (.html) from a given
> directory on a webserver. Could look like this.
> www.madeup.com/getall/files/ The problem is that I dont know the
> names of the files!

And there's no way you can.  In fact, you can't even know if things at
the other end really are files at all.

Quote:
> Is there any way to get a HTTP:Request to act
> simillar to the opendir() function.

No.  opendir() and URL access are totally different beasties.  Don't
think one is a remote form of the other, it isn't.

Quote:
> Or is there any other good way to do this.  Copy all files from a
> webserver when I dont know the name of the files.

You can construct a gatherer out of LWP::UserAgent, HTTP::Request and
HTML::Parser, q.v.

Try the "wget" tool for recursive copying (note the "kindness" options
wget provides):

    http://www.freshmeat.net/appindex/1998/02/07/886856050.html

You can't retrieve stuff that isn't linked in some way (which is a
GoodThing(tm)) and...it's not perl though :-)

hth
tony



Fri, 13 Sep 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Nice little problem....

2. nice beginner problem

3. 2 little problems (regexp and do)

4. A little example of non-orthogonality problem

5. Little Perl Problem...

6. Perl 4.009 has at least one serious problem

7. problem (at least for me) with pack()

8. Having a little problem with changing multiple lines in an html file

9. label-less dump problem

10. Little CGI Problem (I hope)

11. A little Cookie-Problem!!

12. A little problem with Perl code

 

 
Powered by phpBB® Forum Software