Downloading large amounts of files
Hard Rock

So what I want to do is basically download a large amount of files from a website. Now, I don't really want to click on every link, so I'm looking for a quick and easy way to do this.

I think wget is what I'm looking for, but now I'm not sure what language to write the script in to use it.

Basically I want to do this in a scripting language.

path = "website here";
for(int index = 0; index < 100; index++)
{
  url = path + index;
  filename = index +."zip";
  wget url filename
}

I mean I'm sure I could write this code in Java or C++ and have it to the above, but what I'm looking for is a tool that is meant for these kind of tasks as I don't think it makes sense writing separate applications each and every time I want to create something similar.

I think that's basically what I want to do, so what scripting language and or tool would make this the easiest? Anything I can write the above in say 3-5 lines of code in notepad and then just execute from the command line?

gnolam

Something like wget -r -np -A .zip www.foo.bar/frotz/ should do the trick. I think. I can't recall the exact syntax right now, but it's all in the manual.

jhuuskon

FOR /L %i IN (0,1,99) DO wget whatever options just %i where you want the number

edit4: fixx0red or maybe not.

MiquelFire

If there's a high language script, you could use that, provided you can run it in a command in the case of PHP

Above two works as well. (jhuuskon's is Windows only though)

ReyBrujo

You can also create a list of files you want to download, and then pass it with -i to wget, if I recall correctly.

Matthew Leverton
Hard Rock

Awesome, thanks all!

Thread #593737. Printed from Allegro.cc