Computing.Net > Forums > Disk Operating System > copy subdirectories?

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

copy subdirectories?

Reply to Message Icon

Name: CJ
Date: February 19, 2002 at 19:12:00 Pacific
Comment:

Hi. I have to copy a directory, which has about 100 subdirectories. What is the switch to copy those as well? I've been trying to use "copy *.* d:\dir /e". But /e isn't a valid switch. Weird because that's what I've always used.

Am I way off here? Thanks..
CJ



Sponsored Link
Ads by Google

Response Number 1
Name: Secret_Doom
Date: February 19, 2002 at 19:43:25 Pacific
Reply:

The command you want ain't COPY, but XCOPY.
I believe you always used it, because you're using the right sintax.

-- Secret_Doom - Leonardo Pignataro --

secret_doom@hotmail.com
www.batch.hpg.com.br


0

Response Number 2
Name: keith
Date: February 20, 2002 at 07:26:55 Pacific
Reply:

Using xcopy will work but you need to have
/s to copy subdirectories
xcopy form to /s
example: xcopy c:\windows\*.* e:\ /s


0

Response Number 3
Name: Secret_Doom
Date: February 20, 2002 at 09:37:29 Pacific
Reply:

I'm sorry, but I disagree with you, Keith.

It's the /S is NOT necessary since he is already using the /E switch (which is the same this as /S/E) This switch copyies all the subdirectories, INCLUDING THE EMPTY ONES (the /s doesn't make that)

Xcopy *.* d:\dir /e

Will copy ALL subdirectories from current directory within their files (as well as the files from the current directory) to d:\dir

For more information:
xcopy /?

-- Secret_Doom - Leonardo Pignataro --

secret_doom@hotmail.com
www.batch.hpg.com.br


0

Response Number 4
Name: CJ
Date: February 20, 2002 at 15:18:19 Pacific
Reply:

Thank you both very much for your help. I love it when it turns out to be something so simple! Can't believe I was using copy instead of xcopy.

Anyways - all is well. The only snag I hit was trying to copy everything with the exception of one file, but no biggie.

Thanks again.
CJ


0

Response Number 5
Name: fred6008
Date: February 20, 2002 at 19:34:50 Pacific
Reply:

That's o.k. for you, but others reading the post might get the wrong idea. To copy C:\DIR and all its subdirectories to D:, you need to first make a DIR directory on D: or XCOPY will put the files from C:\DIR on D:\.
Then when you have a similar DIR directroy on D: You enter XCOPY C:\Dir D:\DIR /S. (The reason to use /S is because /E does not work on all versions of MS-DOS--6.00 has the problem with it I believe)


0

Related Posts

See More



Response Number 6
Name: Secret_Doom
Date: February 21, 2002 at 15:34:46 Pacific
Reply:

FRED6008: I see your point on the /S switch.

I think we're having a version conflict here in other point:

On Dos7 XCOPY, the destination directory does NOT need to exist. Xcopy will just prompt if d:\dir is a filename or a directory. Even if there is already a file named "dir" at D:\ it will make that prompt.

Perhaps you're taking as base a xcopy from other version of Dos ?

-- Secret_Doom - Leonardo Pignataro --

secret_doom@hotmail.com
www.batch.hpg.com.br


0

Sponsored Link
Ads by Google
Reply to Message Icon






Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Disk Operating System Forum Home


Sponsored links

Ads by Google


Results for: copy subdirectories?

copy files www.computing.net/answers/dos/copy-files-/10684.html

DOS copying files / drive to drive. www.computing.net/answers/dos/dos-copying-files-drive-to-drive/15628.html

copy files not directories www.computing.net/answers/dos/copy-files-not-directories/2629.html