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 download a file from the web using RoboCopy? What would the syntax for that be? Here's what I'm trying:

RoboCopy "" "C:\some_folder\" "index.html" /L /V /E /LOG:"C:\some_folder\test_robocopy.log" /R:10 /W:30

The error log is giving me an error that seems to indicate the file is a folder, and also that it's trying to hit as a folder on my location machine.

   ROBOCOPY     ::     Robust File Copy for Windows                              

  Started : Tue Jan 08 10:31:04 2013

   Source : C:\some_folder\http:\\index.html\
     Dest : C:\some_folder\index.html\

    Files : *.*

  Options : *.* /V /L /S /E /COPY:DAT /R:10 /W:30 


2013/01/08 10:31:04 ERROR 123 (0x0000007B) Accessing Source Directory C:\some_folder\http:\\index.html\
The filename, directory name, or volume label syntax is incorrect.
share|improve this question
robocopy doesn't speak HTTP. – jscott Jan 8 '13 at 15:40
up vote 3 down vote accepted

The only way I can conceive of making this work is if you create a WebDAV share, such as the one at, and then address it as a UNC (\\\folder) and the minidirector in the WebClient service will handle it.

But that requires a specific configuration on the web server.

Also, Invoke-WebRequest if you're using PS 3.

Edit: Also make sure the WebClient service is running before trying to access WebDAV shares on the command line. Windows Explorer will start the service on demand, but cmd.exe or powershell.exe will not.

share|improve this answer

No, this doesn't work. You'll need to use some other method for downloading the file from the internet before you try and robocopy it. Perhaps one of the ports of wget or similar would meet your needs or you can download a file natively in PowerShell 2.0 like this:

$webClient = New-Object System.Net.WebClient
$webURL = ""
$filePath = "c:\whatever\index.html"
share|improve this answer

Your Answer


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

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