Thursday, July 3, 2014

wget for Windows

If you are stranded on a Windows machine and you need to do a wget, you will be horrified to discover that there is not such tool.
Here http://nyquist212.wordpress.com/2013/09/23/powershell-webclient-example/ they show how to use PowerShell to emulate the command.
For me, this simple code worked:
run PowerShell,

Function Get-Webclient ($url, $out) {
 $request = New-Object System.Net.WebCLient
 $request.DownloadFile($url, $out)
}

Get-Webclient "http://www.google.com" "C:\tmp\Foo3.txt"



Windows is so pathetic that if I were a Microsoft developer I would pretend I work serving fries in a Mac Donald to avoid being shunned by my neighbors...

No comments: