Sunday, September 18, 2011

wget guickstart tutorial for windows

Installing Wget
As explained in my last post, wget is a small tool used to download files, mirror web pages as well as alot of other things. It works in the command line environment.

To be able to use wget from any directory, you will first need to place it in the main system path folders, where it can be accessed from any directory.

To find out the main system path;
open command prompt, and
type path.

you will see the various paths separated by semi colons.
copy wget into the main part, most often, in windows it is either the system32 folder, or windows folder.
Copy wget.exe into system32, or windows folder.

you can test if wget is working well, by typing

wget -h, and hitting the enter key in command prompt.

If correctly installed, it displays a list of help commands.

NB: you can use windows explorer or command prompt to copy wget.exe, to the main system path folder.

It is always advisable, to create a working directory, where you want your downloads to be placed. you can create this in windows, or command prompt using the md command.

After creating the working folder,
In command prompt, navigate to the working folder, that is where you want to put the downloaded files or websites.

To download a file,
open command prompt, and navigate to the folder where you want the files to be downloaded and kept.

Type wget, followed by number of retries, url of file, and ampersand, if you want to enable background downloading, and press the enter key.
i.e.
wget -t 30 http://www.url of file to be downloaded &
e.g.
wget -t 25 http://www.runtime.org/raid_recovery_for_windows.cab &

To mirror a complete website,
open command prompt
navigate to where you want website to be downloaded and kept, and
type wget -m url of website

then press enter.
e.g.
wget -m http://www.runtime.org

To mirror a website recursively,
i.e. relink the downloaded files locally,
type wget -mk url of website to be mirrored.
e.g.
wget -mk http://www.runtime.org

and don't forget the ampersand if you want to enable background downloading. i.e. to allow wget to continue mirroring of the website after you log out.

You can get wget from the gnu website, softpedia, cnet download.com, or by simply performing a google search.

Good Luck and Happy downloading.

No comments:

Post a Comment