Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Like wget or curl, but without having to install either of those progs?

share|improve this question
    
+1 for Lord.Quackstar point –  dag729 Jul 9 '10 at 22:23
    
+1 for Lord Quackstar –  Moab Jul 9 '10 at 22:43

3 Answers 3

up vote 2 down vote accepted

Jupp, if you are using Windows 7 Powershell should be installed by default so then you open a shell and type

(New-Object System.Net.WebClient).DownloadFile("URL", "filename")

to download the resource at the specified URL to your disk using the supplied filename.

If you do this frequently then it might be worthwhile to create a function in your Powershell profile. To do this, create the file %UserProfile%\My Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1 and add for instance the following function

function download-file { 
   param($url, $filename) 
   (New-Object System.Net.WebClient).DownloadFile($url, $filename)
}

Then you can download a file from Powershell through the slightly more convenient download-file "url" "filename".

share|improve this answer

You mean like the wget over here?

share|improve this answer
1  
I would suggest this port of wget: gnuwin32.sourceforge.net/packages/wget.htm (which doesn't have a 4GB file limit). –  Richard Jul 9 '10 at 11:18

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.