Friday, April 10, 2009


  • robocopy, or "Robust File Copy", is a command-line directory replication command.
  • It was available as part of the Windows Resource Kit, and introduced as a standard feature of Windows Vista and Windows Server 2008.
  • Robocopy is notable for capabilities above and beyond the built-in Windows copy and xcopy commands.
  • You can script the commands and save them as .cmd files to deploy files to staging site or live site.

Command Examples:

  • Copy test.dll from bin folder under folder1 to bin folder under folder2, if test.dll has already existed in folder2, then it will be overwritten. It will not delete any files in folder2 which do not extist in folder1.
    • robocopy C:\folder1\bin C:\folder2\bin test.dll
  • Copy content from test to test, including subfolders, excludes folders named .svn, excludes files with .vb extension. If test folder does not exist in folder2, it will create one for you.
    • robocopy C:\folder1\test C:\folder2\test /S /XD .svn /XF *.vb
  • Create test folder only
    • robocopy C:\folder1\test C:\folder2\test /xf *.*



blog comments powered by Disqus