Thursday 1 December 2011

Wget: beyond DEFAULT*

wget is great command line downloading utility. It can be used to download any file from http or ftp uri.
So, here are some step to setup wget and get it working to download some stuff over internet.

Download wget:
for window: 
http://gnuwin32.sourceforge.net/packages/wget.htm


Install/Extract wget to any directory of your choice.
I've install it inside my 'C:" dir  such that my path to wget is as follow:
" C:\Program Files (x86)\GnuWin32"


Once done, let set its path to system environment variable.

Right click on my computer and go to properties.



go under "Advanced" tab and at the bottom click on Environment variable button.

Select the PATH system variable and click 'Edit' .
Now, copy the path to "wget" bin folder and append in the PATH variable .

Now click 'Ok', 'Apply' and then 'Ok'.
Fire up the command prompt by pressing "Win+R" button and type "cmd".
Once done, try executing wget to see if our path variable is set properly or not.

In the cmd type "wget", if you see some output as this, then you're up and running.Everything is set correctly as expected.


Lets try download this file:
http://notes.corewebprogramming.com/student/Servlets.pdf

In the cmd type :
wget http://notes.corewebprogramming.com/student/Servlets.pdf


You'll see your file downloading...









No comments:

Post a Comment