downloading from a list

I am dealing with a web site that contains a lot of files that are named in sequence. Would it be best to use java to make an algorithm to download them or is there some software that already does the job? For an example, the site might be built like this:

http://www.asite.com/file01.txt

http://www.asite.com/file02.txt

so on and so forth.

If I should use java, how would I code that?

[416 byte] By [hartmanja] at [2007-10-1 3:48:21]
# 1
Hi!Check out the following classes:- java.net.URL- java.net.HttpURLConnectionYou should be able to solve this with a loop that constructs HttpURLConnection objects and saves the data to a localfile. The loop terminates when there is no "next file"./
ronniebahlstena at 2007-7-8 22:40:00 > top of Java-index,Other Topics,Algorithms...
# 2
That is interesting. I assume those classes are in the current SDK, right?
hartmanja at 2007-7-8 22:40:00 > top of Java-index,Other Topics,Algorithms...
# 3
Really what I want to do is copy a jpeg directly from a web adress to a location locally. I'd do it by hand if there weren't several hundred jpegs to type in and click on. I'm trying to find answers within the forums, but they aren't quite what I am looking for.
hartmanja at 2007-7-8 22:40:00 > top of Java-index,Other Topics,Algorithms...
# 4
If you only need to do that once, you may well find the "by hand" version to be faster than writing and running the program. In fact you could already have done it in the time spent waiting for answers here.So if this is something you are going to do regularly, then let us know.
DrClapa at 2007-7-8 22:40:00 > top of Java-index,Other Topics,Algorithms...
# 5
Indeed. However, isn't it man's desire to find things to do the work for him, even if he puts in more work to do it himself. :P
hartmanja at 2007-7-8 22:40:00 > top of Java-index,Other Topics,Algorithms...
# 6

While other people spend 100 days solving a problem, programmers spend 99 days writing a program that can solve the problem in just one day.

By the way, when I went to college there was this program specially designed for downloading pictures from the internet. It could go on the whole weekend, and Monday morning the disc (at the datalab PC) was filled with ... well ... pictures. I dont know the programs name though... 朅nd the most eager users didnt even finish college.

Ragnvald_id2a at 2007-7-8 22:40:00 > top of Java-index,Other Topics,Algorithms...
# 7
What you are trying to do is not uncommon, a goggle search of 'java web spider open source' has turned up this lot. http://www.google.co.uk/search?hl=en&q=java+web+spider+open+source&btnG=Google+Search&meta=
MartinS.a at 2007-7-8 22:40:00 > top of Java-index,Other Topics,Algorithms...
# 8
> While other people spend 100 days solving a problem,> programmers spend 99 days writing a program that can> solve the problem in just one day.Which sounds stupid until the second time the problem arises ;-)D.
dcmintera at 2007-7-8 22:40:00 > top of Java-index,Other Topics,Algorithms...