How to download multiple numbered images from a website in an easy manner?

932 views Asked by At

I'd like to download multiple numbered images from a website.

The images are structured like this:

http://website.com/images/foo1bar.jpg

http://website.com/images/foo2bar.jpg

http://website.com/images/foo3bar.jpg

... And I'd like to download all of the images within a specific interval.

Are there simple browser addons that could do this, or should I use "wget" or the like?

Thank you for your time.

1

There are 1 answers

0
Albert Wifstrand On

Crudely, on Unix-like systems:

#!/bin/sh
for i in {1..3}
do
    wget http://website.com/images/foo"$i"bar.jpg
done

Try googling "bash for loop".

Edit LOL! Indeed, in a haste I omitted the name of the very program that downloads the image files. Also, this goes into a text editor, then you save it with an arbitrary file name, make it executable with the command

chmod u+x the_file_name

and finally you run it with

./the_file_name