Results 1 to 8 of 8
Thread: how to wget multiples files ?
-
04-12-2004, 02:16 AM #1Newbie
- Join Date
- Feb 2004
- Posts
- 20
how to wget multiples files ?
there is a file like http://localhost/test.html which contents more than ten dl url in that file like http://1234.com/test1.zip , http://2345.com/test2.zip , and http://4532.com/test3.zip etc....
What is the best way to get all the files in test.html ? Thanks
-
04-12-2004, 03:14 AM #2Web Hosting Master
- Join Date
- Jul 2003
- Location
- Kuwait
- Posts
- 5,104
From the wget manual :
Code:-i file --input-file=file Read URLs from file, in which case no URLs need to be on the command line. If there are URLs both on the command line and in an input file, those on the command lines will be the first ones to be retrieved. The file need not be an HTML document (but no harm if it is)---it is enough if the URLs are just listed sequentially. However, if you specify --force-html, the document will be regarded as html. In that case you may have problems with relative links, which you can solve either by adding "<base href="url">" to the documents or by specifying --base=url on the command line.
-
04-12-2004, 05:36 AM #3Newbie
- Join Date
- Feb 2004
- Posts
- 20
Thanks for your help, but I still don't get it. ;(
Can you show me more specific detail ?
Like there 2 links like http://1234.com/asdf.zip and http://1234.com/jkl.zip in http://localhost.com/test.html
Then how do I use the command --input-file like you just showed me? Thanks
-
04-12-2004, 01:35 PM #4Web Hosting Master
- Join Date
- Jul 2003
- Location
- Kuwait
- Posts
- 5,104
Code:wget -i --force-html http://localhost.com/test.html
-
04-12-2004, 02:10 PM #5Newbie
- Join Date
- Feb 2004
- Posts
- 20
It doesn't work for me. It just dl the .html file not the file in .html . It showed up on the screen is
--force-html: No such file or directory
No URLs found in --force-html.
-
04-12-2004, 02:36 PM #6Newbie
- Join Date
- Apr 2004
- Location
- Scottsdale, Arizona
- Posts
- 28
Are these files links on that html page?
If they are, and in a lower or the same directory try this
wget -r -np http://wwww.test.com/test1.html
Take a look at the manual page.
-
04-12-2004, 08:27 PM #7Web Hosting Guru
- Join Date
- Nov 2003
- Location
- Ljubljana, Slovenija, Europe
- Posts
- 298
perhaps there are some security or privilege issues you are unaware of? Airnine
-
10-27-2006, 04:02 AM #8Web Hosting Master
- Join Date
- Jun 2003
- Location
- UK
- Posts
- 6,616
If you want to just mirror a directory you can do wget -mp http://....
Russ Foster - Industry Curmudgeon
Freelance Sysadmin for Hire - email vaserv@gmail.com