1

This question already has an answer here:

I am very new to cmd prompt and I was asked to find out how to script cmd to pull files from a website.

Honestly, I am totally at a loss, so any help would help me escalate the project I am working on.

Currently, I am using this script to go to the website but, but I am probably making some kind of mistake. I am on Windows 7.

@echo Off
TITLE Download Treasury Files
Pause
CD C:\Users\wkhan\desktop
START http://www.treasury.gov/ofac/downloads/t11sdn.pdf

marked as duplicate by slhck May 12 '14 at 14:53

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

0

I think there is no built in tool in Windows that would do that for you. But there are plenty free programs on the web, that you can install and then call from your batch script. Here is one of them: CURL

Here is a basic example of how to use it (using your link)

@echo Off
TITLE Download Treasury Files
Pause
CD C:\Users\wkhan\desktop
curl http://www.treasury.gov/ofac/downloads/t11sdn.pdf > download.pdf

This would download and save the file from the URL you have provided to download.pdf

Another possible alternative would be WGET.

  • 1
    when I try to install CURL this is the error msg: "the program cant start because libssl32.dll is missing from your computer. try reinstalling the program to fix this problem. – Vaz May 12 '14 at 14:37
  • I got that same error with wget and it used to work. It must be something with the environment settings... – David Brossard Dec 21 '15 at 22:54

Not the answer you're looking for? Browse other questions tagged or ask your own question.