Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I come from a Linux/Unix background and I have been wondering if Windows has a binary that can download files from the console.

I would like to automate a certain process and one of my requirements it to not install much software, but use the built-in stuff as much as possible.

Thanks!

share|improve this question
add comment

3 Answers

up vote 1 down vote accepted

There is no wget like built-in command in Windows. You can use the .net Framework via Windows PowerShell like in this example:

http://superuser.com/questions/362152/native-alternative-to-wget-in-windows-powershell

or like i do and use wget for Windows:

http://gnuwin32.sourceforge.net/packages/wget.htm

share|improve this answer
    
Thanks! I was hoping for a native binary, but... what the heck -- wget it is! :D –  carlspring Mar 1 '13 at 14:09
add comment

Powershell.

$wc = New-Object System.Net.WebClient
$wc.DownloadFile($source, $dest)

There's also Invoke-WebRequest in PS 3.0.

share|improve this answer
    
I was really hoping for a native implementation part of the system. –  carlspring Mar 1 '13 at 14:08
1  
It is a native part of the system. It comes with Windows out of the box. –  Ryan Ries Mar 1 '13 at 14:09
    
Thanks for the clarification. –  carlspring Mar 1 '13 at 14:11
add comment

If you have PowerShell >= 3.0, you can use Invoke-WebRequest

Invoke-WebRequest http://superuser.com -OutFile index.html

Or golfed

wget http://superuser.com -outf index.html

Download a file via HTTP in Windows

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.