Download a File in a Batch File

3

Possible Duplicate:
Download a file via HTTP from a script in Windows

I've never done any scripting on Windows but now I need to write a batch file that downloads a file off the Internet (amongst other things). If it was Linux I would use wget.

Is there a built-in executable that will download a file to a given directory? This needs to run on Windows XP.

Cristian

Posted 2010-03-08T10:13:13.900

Reputation: 333

Question was closed 2010-05-18T12:07:29.903

1

What makes you think you can't use wget on windows? See http://gnuwin32.sourceforge.net/packages/wget.htm.

– None – 2010-03-08T10:16:18.847

There is a somewhat built-in HTTP download command. It comes with the resource kit and it is called bitsadmin.exe . FTP download , on the other hand, can be done with a basic DOS script. – djangofan – 2011-12-23T23:39:24.313

Answers

4

There is no builtin. But wget works just fine in batch files.

John Knoeller

Posted 2010-03-08T10:13:13.900

Reputation: 239

1

thats wrong, http://msdn.microsoft.com/en-us/library/aa362813(VS.85).aspx is part of the system since windows xp.

– akira – 2010-05-18T09:50:25.383

@akira - wow! i didn't know about that one. it turns out that i only installed half of the support tools and i was missing this one among some others. thanks! – djangofan – 2011-12-07T21:13:50.323

1

Wget has a Windows version as well. I assume you know how to use it. Besides Wget, there is also cURL (A Windows version is available here, but I haven't used it). You can give it a try.

user31894

Posted 2010-03-08T10:13:13.900

Reputation: 2 245