I want to download all the *.gif files from a particular location. For example, say the location is http://asdf.com/file/images/*.gif. When I use:

wget -m http://asdf.com/file/images/

I get a 403 (permission denied) error. But when I use:

wget -m http://asdf.com/file/images/xyz.gif

It works perfectly. There are about 50 images; how can I download them? I can't write 50 wget commands

link|improve this question
1  
Do you know the filenames? – SLaks Jun 28 '10 at 18:25
1  
Don't repost your questions. This is the same as Image folder download using wget. – Matthew Flaschen Jun 28 '10 at 18:27
If you know the filenames this is trivial, especially if they are sequential (image001, image002, etc...) – John T Jun 28 '10 at 18:33
@Matthew I think the problem here is this fellow posted the same question on stackoverflow.com and superuser.com. Naturally, someone at stackoverflow migrated the question here and it was duplicated. – ghoppe Jun 28 '10 at 19:21
feedback

migrated from stackoverflow.com Jun 28 '10 at 18:28

This question came from our site for professional and enthusiast programmers.

2 Answers

This is not possible.

wget cannot know which files exist on the remote server.

Instead, if the server has directory browsing enabled, or if the images are linked somewhere, you can crawl some other page.

link|improve this answer
feedback

You first example is trying to get a directory listing. The server has directory listing disabled and returning a 403.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown