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

4 Answers 4

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.

4
  • PowerShell is not native on 2k3 right?
    – noraj
    Jun 2, 2019 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 3, 2019 at 6: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 3, 2019 at 18:52
  • @noraj: I think for those purposes BITS, or XMLHTTP with VBScript are somewhat common
    – Joey
    Jun 4, 2019 at 7: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
0

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

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .