1

I have a batch file, and I'd like to make a part of it save/download a file from a website...

eg. example.com/file.jpg

This would then be saved to a location on my computer. Is there a way to do this? I've tried using the copy/xcopy/ROBOCOPY commands, but to no avail.

My operating system is Windows 8.1

Paul
  • 2,620
  • 2
  • 17
  • 27
technotron101
  • 29
  • 1
  • 1
  • 7

2 Answers2

2

You can use bitsadmin /? it's native in windows but not sure in windows8

bitsadmin.exe /transfer "JobName" http://download.url/here.exe C:\destination\here.exe
Community
  • 1
  • 1
Paul
  • 2,620
  • 2
  • 17
  • 27
0

It is operating system specific. On POSIX systems, you might use curl or wget to download files; perhaps they exist on your OS (even if it not POSIX compliant, e.g. Windows, to which both utilities have been ported)

Both curl & wget are free software. You can download their source code, perhaps adapt it to your additional needs (I guess you won't have to do that, but who knows?), compile them into some executable, and run that executable on the command line.

Basile Starynkevitch
  • 223,805
  • 18
  • 296
  • 547