Help with Dos Commands

Mister T

Diamond Member
Feb 25, 2000
3,439
0
0
I need to copy c:\Mydocs to d:\Mydocs
Directory Mydocs has a bunch of subdirectories and I want to do it with 1 command.

I tried

copy c:\mydocs d:\mydocs

but it only copied files in the root, not any of the subdirectories
how do I modify the command?
 

Wuming

Golden Member
Dec 14, 2000
1,030
0
0
try copy c:\Mydocs\. d:\Mydocs?

oh my... haven't used dos commands for so long. tell me if it works okay? :)
 

piku

Diamond Member
May 30, 2000
4,049
1
0
maybe

xcopy c:\mydocs d:\mydocs

haven't used dos in a while... alternatly try

c:\mydocs\*.* d:\mydocs
 

Whitedog

Diamond Member
Dec 22, 1999
3,656
1
0
I could tell you , but this will do you ever better.. it will "educate" you. ;)

type copy /?
or xcopy /?

This will give you a list of all the avalable "switches" you can use.

The answer is real simple. :)
 

Whitedog

Diamond Member
Dec 22, 1999
3,656
1
0
OK, I won't be mean.

You have to use XCOPY

xcopy c:\mydocs d:\ /s or /e
(it will create d:\mydocs if doesn't exist)

If you already have a d:\mydocs DIR and type xcopy c:\mydocs d:\mydocs...etc. you'll end up with..
d:\mydocs\mydocs\*
 

teknoid

Senior member
Nov 10, 1999
468
0
0
If you and to keep long filenames (if any) you have to use the following line from the start-run command (NOT a DOS window)

xcopy32 c:\mydocs\*.* d: /h /e /c /k

That will create any and all directories, keep file attributes, ignore "file busy" errors, etc.

Used it many times to clone from one drive to another before I got Ghost.