3

I need to know if there is a utility built-in to Windows Server 2003 that I can use from the command line to download a file using only one command.
Basically I know that I can download from ftp using the ftp utility but in order to do that I need to do first ftp open and then pass the other commands so it doesn't help me because I need to do perform the download only from one command. The download may be performed through http, ftp or any other protocol.

OS Name: Microsoft(R) Windows(R) Server 2003 Enterprise x64 Edition
OS Version: 5.2.3790 Service Pack 2 Build 379
jscott
  • 24,204
  • 8
  • 77
  • 99
Michael
  • 137
  • 8

4 Answers4

2

Nothing built-in I'm aware of. If you have PowerShell installed you can use System.Net.WebClient for that, even though you may still want a wrapper for ease of use:

$wc = New-Object Net.WebClient
$wc.DownloadFile('http://...', file)

But if you first need to install something, then there are many other options out there, too.

Joey
  • 1,823
  • 11
  • 13
  • PowerShell is not native on 2k3 right? – noraj Jun 02 '19 at 21:48
  • @noraj: No. But nowadays that shouldn't really matter. Either you can install it (in an ancient version), or no longer have a long-unsupported OS running (hopefully). – Joey Jun 03 '19 at 06:02
  • it doesn't matter for a production purpose. But I was more seeing this in a security ethical hacker purpose, like finding an utility or short script way that help the security research to download a backdoor. So actually it matters a lot to me. But yeah most people don't core of this. – noraj Jun 03 '19 at 18:52
  • @noraj: I think for those purposes BITS, or XMLHTTP with VBScript are somewhat common – Joey Jun 04 '19 at 07:08
1

tftp is perfect for this stuff! it requires a tftp server, but means you can do one line file download commands.

It's been removed from the most recent MS server and client OS's because it makes downloading & installing virus payloads so easy!

tftp -i x.x.x.x get file.txt
Nick Kavadias
  • 10,758
  • 7
  • 36
  • 47
0

I prefer to use ncftp for this kind of thing: http://www.ncftp.com/

Coding Gorilla
  • 1,938
  • 12
  • 10
0

wget and curl (open source utilities) should each be able to meet your needs.

wget: http://www.gnu.org/software/wget/

curl: http://curl.haxx.se/

(Despite the "haxx" domain name, it is a very safe and common open-source tool.)

-Waldo

gWaldo
  • 11,887
  • 8
  • 41
  • 68