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.

How can I download something from the web directly without Internet Explorer or Firefox opening Acrobat Reader/Quicktime/MS Word/whatever?

I'm using Windows, so a Windows version of Wget would do.

share|improve this question
    
Just right clicking a file and hitting "Save Target As" or "Save Link As" or "Save As" (language varies depending on your browser) will work. –  BrainSlugs83 Oct 22 '12 at 5:53
6  
The point of having a command is being able to write a batch file and run it (perhaps scheduled as a task) anytime you want. That's where the GUI falls short. –  Jbm Nov 15 '12 at 14:11
add comment

15 Answers

up vote 70 down vote accepted

Wget for Windows should work.

GNU Wget is a free network utility to retrieve files from the World Wide Web using HTTP and FTP, the two most widely used Internet protocols. It works non-interactively, thus enabling work in the background, after having logged off

.

share|improve this answer
6  
There's also Winwget cybershade.us/winwget if you prefer a gui –  Col Aug 19 '09 at 11:47
    
The standalone version is downloadable from this link. –  VitoShadow Feb 24 at 11:19
add comment

An alternative I discovered recently, using PowerShell:

$client = new-object System.Net.WebClient
$client.DownloadFile("http://www.xyz.net/file.txt","C:\tmp\file.txt")
share|improve this answer
29  
You can also do it in one-line: (new-object System.Net.WebClient).DownloadFile('http://www.xyz.net/file.txt','C:\tmp\file.tx‌​t') –  schellack Oct 14 '11 at 20:32
7  
@Rob powershell is built in to Windows... –  nhinkle Dec 14 '12 at 4:22
4  
From Vista up, yes. –  Arran Dec 19 '12 at 12:44
3  
@BrainSlugs83, absolutely, but many, many, people are still using XP. It's merely something to bear in mind. –  Arran May 7 '13 at 8:08
8  
@Arran Okay, for the people with systems that are morbidly out of date (Microsoft ended mainstream support for Windows XP in April 2009, [more than four years ago], and is ending extended support in April 2014 [less than one year from now]), for those users, yes, it's not built-in; they will have to download PowerShell separately (which is still easier to download and setup than any of the GNU toolchains out there) -- but honestly, figuring out how to download a file from the command line should be the least of such a person's computer-related worries... –  BrainSlugs83 Jun 4 '13 at 21:09
show 6 more comments

Windows has its own command line download utility - BITSAdmin:

BITSAdmin is a command-line tool that you can use to create download or upload jobs and monitor their progress.

share|improve this answer
4  
Interesting. That is one clumsy piece of software compared to wget. –  Matt H Mar 28 '12 at 21:36
    
Note that It doesn't ship with Windows XP, and maybe not with other versions either. –  Ian Dunn May 22 '12 at 23:06
3  
Update: BITSAdmin is deprecated and is not guaranteed to be available in future versions of Windows. Administrative tools for the BITS service are now provided by BITS PowerShell cmdlets. –  nulldev07 Sep 28 '12 at 5:49
    
Thanks, will try it. –  Ayusman May 22 '13 at 23:58
    
@MattH: because it's nto suppsoed to be wget in the first place? - see en.wikipedia.org/wiki/Background_Intelligent_Transfer_Service –  peterchen Sep 27 '13 at 12:17
add comment

Save the following text as wget.js and simply call

cscript /nologo wget.js http://example.com

This is the code:

var WinHttpReq = new ActiveXObject("WinHttp.WinHttpRequest.5.1");
WinHttpReq.Open("GET", WScript.Arguments(0), /*async=*/false);
WinHttpReq.Send();
WScript.Echo(WinHttpReq.ResponseText);

/* To save a binary file use this code instead of previous line
BinStream = new ActiveXObject("ADODB.Stream");
BinStream.Type = 1;
BinStream.Open();
BinStream.Write(WinHttpReq.ResponseBody);
BinStream.SaveToFile("out.bin");
*/
share|improve this answer
1  
Thank you, that's exactly what I needed ! –  Isaac Clarke May 22 '13 at 6:57
add comment

There is also a native cURL for Windows available here. There are many flavors available- with SSL support, without SSL support. You don't need the extra baggage of cygwin and the likes, just one small exe file.

share|improve this answer
add comment

I made a quick myGet.bat file which calls the powershell method described above.

@Echo OFF
SetLocal EnableDelayedExpansion
Set Var=%1
Set Var=!Var:http://=!
Set Var=!Var:/=,!
Set Var=!Var:%%20=?!
Set Var=!Var: =?!
Call :LOOP !var!
Echo.Downloading: %1 to %~p0!FN!
powershell.exe -Command (new-object System.Net.WebClient).DownloadFile('%1','%~p0!FN!')
GoTo :EOF
:LOOP
If "%1"=="" GoTo :EOF
Set FN=%1
Set FN=!FN:?= !
Shift
GoTo :LOOP

I borrowed some code from here: http://www.computing.net/answers/programming/parsing-url-for-filename-with-space/14749.html

share|improve this answer
    
why the downvote? this looks okay to me and is a direct response to the question. Yes it's clunky and could use improvement, like escaping ampersands (&) in the url, but it works as is. –  matt wilkie Apr 24 '13 at 5:02
add comment

I know I am really late. I was searching for the same, and since I had no privilege to install any of the above packages, I went for a small workaround (to download 30+files)

  • I created a batch file
  • listed all the files
  • put firefox.exe at the beginning of each line
  • went to the firefox directory in Program Files
  • ran it.
share|improve this answer
    
+1 for sideways thinking –  matt wilkie Apr 24 '13 at 5:05
add comment

And one more for completeness, Cygwin has wget (and many more utilities).

share|improve this answer
add comment

You can get WGet for Windows here. Alternatively you can right click on the download link of the item you want to download and choose Save As. This will download the file and not open it in the assigned application.

share|improve this answer
add comment

And http://www.httrack.com/ has a nice gui (and it's free), for mirroring sites. Also has a Linux version.

share|improve this answer
add comment

If you want a GUI, then try VisualWget, which is actually clean, and feature full. It is based on GNU Wget for its download engine.

EDIT: updated link.

share|improve this answer
1  
here is an updated link: sites.google.com/site/visualwget/… (the downloads are at the bottom of the page, use the little arrows on the right) –  Reed Hedges May 13 '12 at 12:43
add comment

If PowerShell is an option, that's the preferred route, since you (potentially) won't have to install anything extra:

(new-object System.Net.WebClient).DownloadFile('http://www.xyz.net/file.txt','C:\tmp\file.tx‌​t')

Failing that, wget for windows, as others have pointed out is definitely the second best option. As posted above it looks like you can download wget all by itself, or you can grab it as a part of Cygwin or MSys

If for some reason, you find yourself stuck in a time warp, using a machine that doesn't have PowerShell and you have zero access to a working web browser (i.e. IE is the only browser on the system, and its settings are corrupt), and your file is on an FTP site (as opposed to HTTP):

start->run "FTP", press "OK".

If memory serves it's been there since Windows 98, and I can confirm that it is still there in Windows 8 RTM (you might have to go into appwiz.cpl and add/remove features to get it). This utility can both download and upload files to/from FTP sites on the web. It can also be used in scripts to automate either operation.

This tool being built-in has been a real life saver for me in the past, esp. in the days of ftp.cdrom.com -- downloaded Firefox that way once, on a completely broken machine that had only dial-up internet (back when sneaker-net's maximum packet size was still 1.44 MB, and Firefox was still called "Netscape" /me does trollface).

Couple of tips, it's its own command processor, and it has its own syntax, try typing "help". All ftp sites require a username and password; but if they allow "anonymous" users, the username is "anonymous" and the password is your email address (you can make one up if you don't want to be tracked, but usually there is some kind of logic to make sure it's a valid email address).

share|improve this answer
    
+1 for thinking of command line ftp! However wget and powershell were both mentioned well before you joined the party, so -1 there. :-/ –  matt wilkie Apr 24 '13 at 5:08
add comment

For my unreliable mobile broadband connection, I found http://burnbit.com/ useful.

It turns a URL into a torrent.

share|improve this answer
add comment

I have an extension installed in my browser for selective media and link downloads on webpages: DownThemAll.

Quickly setting a filter for pdf and a target d/l directory, I was able to grab like 50 .pdf doc's linked on a webpage. Walla. Fastest, no install, and the beauty of wget (already in my path in c:\bin) was tarnished by not remembering or being able to figure out a good command line to grab all the pdf's linked from a web page...should worked! /..

share|improve this answer
add comment

An alternative to using gnuwin32 is unxutils which includes wget.

share|improve this answer
    
you can manage with unxutils but it's old, it uses an old version of wget. gnuwin32 is the thing to use. not quite as convenient to install and not as easy to find things, but it has much more than unxutils too. –  barlop Oct 5 '11 at 19:31
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.