-6

I saw questions of this for other types of files but not batch. I don't know much about code, but I have an idea.

Open up the link in Microsoft Edge (because it's already logged into the website), and download it from there. I don't know how to make the batch file to OPEN and DOWNLOAD using Microsoft Edge though. Is this possible?

To open, I think it's this:

start microsoft-edge:http://www.cnn.com

How do I download it after opening Edge?

TylerH
  • 20,799
  • 66
  • 75
  • 101
CreativiTimothy
  • 103
  • 1
  • 8

1 Answers1

4

Not exactly batch file, but using tools that are already part of Windows, you can fetch web content with Powershell, which according to the article, can simulate the Unix curl command.

Another way, if you absolutely insist on using batch, is to install the curl command and then use the answers here to help you get further, using cookies to keep track of the login between multiple invocations of curl.

Basic usage is easy, but maybe you need a curl tutorial to help you do this.

There is another tool called wget that has similar functionality and may be a better or easier method for you. Mileage may vary.

Br.Bill
  • 637
  • 5
  • 12
  • 3
    Ordinarily, "use this tool" answers would be frowned upon, but this is really the only way to do it. – SomethingDark Jul 31 '18 at 22:55
  • Fair. And I've since learned that Powershell has the curl-like `Invoke-WebRequest` function which is supposedly aliased as curl and wget. So I've updated my answer to match. – Br.Bill Aug 01 '18 at 12:18