Using Robocopy to Copy Entire Directories

by Barry Dysert
(last updated August 4, 2014)


Robocopy is the tool to use when working with entire directories, since that's what it was designed to do. If you only want to copy a directory (and its included files) to another directory, you can use the basic syntax for Robocopy, and you need not specify any options. So let's say you have a directory tree that looks like this:


The Temp1 directory contains a file named T1.tmp. The Temp1\Temp2 directory contains a file named T1T2.tmp.

Now, let's say you want to copy the Temp1 directory (and its files) to a new directory called C:\Temp3. The command to do this is:

C:\> ROBOCOPY C:\Temp1 C:\Temp3

Robocopy creates the C:\Temp3 directory and copies the files from the C:\Temp1 directory into it. If you want to copy the entire directory tree under C:\Temp1 you just need to add the /E switch to the command:

C:\> ROBOCOPY C:\Temp1 C:\Temp3 /E

This results in the creation of C:\Temp3, and all of the files and folders under C:\Temp1 will be copied to the newly built tree under C:\Temp3.

 This tip (13188) applies to Windows 7 and 8.

Author Bio

Barry Dysert

Barry has been a computer professional for over 30 years, working in different positions such as technical team leader, project manager, and software developer.  He is currently a senior software engineer with an emphasis on developing custom applications under Microsoft Windows. ...


Using the Narrator

The Narrator is an accessibility feature designed for people who have trouble reading text that's on the screen. Turning ...

Discover More

Process Explorer

Process Explorer is a very well built utility that does a lot, from helping you with performance analysis to finding the ...

Discover More

Moving Files Using the Command Line

The MOVE command can be a timesaver over trying to do the similar sort of thing with Windows Explorer. You can move hundreds ...

Discover More
More WindowsTips

Searching From within File Explorer

Searching from within File Explorer is a quick and easy way to find files and even content within files. This tip shows you ...

Discover More

Using Offline Files

If you need access to files on a network but aren't always on the network, you may find that the offline files feature of ...

Discover More

Saving Search Queries

Windows Explorer has a good search utility built into it. As you use it, you may wish to save your commonly typed searches. ...

Discover More

FREE SERVICE: Get tips like this every week in WindowsTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.


If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] in your comment text. You’ll be prompted to upload your image when you submit the comment. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is three minus 2?

2017-03-21 13:12:26


Austin: that is the system prompt, shown automatically by Windows in the command prompt window. If you are actually "on" a different drive or in a different directory, then the system prompt will reflect your current path.


2017-03-21 13:02:08

Austin Woitte

What is the purpose of the "C:\>" before ROBOCOPY?

It seems to me that ROBOCOPY C:\Temp1 C:\Temp3 is saying robocopy Temp1 into Temp3, so why is there a C:\> before all of it?

2016-09-19 17:24:10


I have not tried Robocopy on Win10. Sorry.

2016-09-19 09:55:06

luis carlos

Does this works in windows 10?
I installed Robocopy GUI in W10 and can't copy a folder from one HD to another HD folder. Any help?

2016-08-31 04:28:11


The only clue I have is that you don't have permission. Note that even if you're the local admin, there are some things you can't do; this appears to be one of them. Sorry I can't be of more help.

2016-08-30 23:29:14

Frank Lindner

I use windows 10 home.

I am trying to copy 'GroupPolicy' directory from C:windowssyswow64 folder to the C:windowssystem32 folder.

Using normal copy/paste it does not work (wont paste).
I tried Roboform copy instead but got an error message saying "access denied" ?

Any clues please.

2015-02-21 05:54:47


In this link,you find some script example to copy files to a Nas using Robocopy and to create a mail report

Newest Tips

FREE SERVICE: Get tips like this every week in WindowsTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.