Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is it possible to copy a file at a HTTP:// URL to a local directory in a BAT or CMD file?

share|improve this question
    
Which OS are you using? – Wesley Mar 9 '10 at 2:03
up vote 6 down vote accepted

Yes, take a look at wget.

share|improve this answer
1  
Cross-platform as well. – John Gardeniers Mar 9 '10 at 3:00
2  
    
Thanks for the info and links, guys. – Wesley Mar 9 '10 at 3:30

Or cURL will work too. It is supposedly Windows too but I have never tried it on Windows.

share|improve this answer
    
Curl works in the windows environment. – RobW Apr 26 '10 at 19:14
    
Thanks for the info RobW. – Richard Holloway Apr 27 '10 at 7:42

Side note: WebClient.DownloadFile works fine from PowerShell as well.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.