# How to copy directories in DOS



## TrentDW

Hi,

I can't for the life of me work out how to copy and entire directory in DOS.

Let's say I have a directory called C:\Test that I want to move to C:\TestDirectory\ so that it becomes a subdirectory. What command do I need to use?

I have tried XCOPY but keep getting errors when I use the syntax

xcopy c:\test c:\testdirectory\ /e

Could someone please help me out?

Thanks,

Trent


----------



## brianF

Try here

http://www.computerhope.com/msdos.htm


----------



## MacFromOK

You can use this:

xcopy /e c:\test\*.* c:\testdirectory\test

If c:\testdirectory\test doesn't exist, you'll
be prompted whether the destination is
a directory or a file.


----------



## TrentDW

Thank you for your responses. I'll give it a shot.

Trent


----------



## MacFromOK

One more thing.

To include hidden and system files be sure
to use the /h switch also:

xcopy /e /h c:\test\*.* c:\testdirectory\test


----------

