delorie.com/archives/browse.cgi   search  
Mail Archives: opendos/2002/09/13/20:18:23

>Received: by krypton.rain.com (rnr)
via rnr; Fri, 13 Sep 2002 17:07:53 -0800
To: opendos AT delorie DOT com
X-Original-Message-From: "JOHN ZENDER" <JOHN AT FUSIONTECHNOLOGY DOT COM>
Subject: Re: DOS command
From: shadow AT krypton DOT rain DOT com (Leonard Erickson)
Message-ID: <20020913.170753.2e8.rnr.w165w@krypton.rain.com>
Date: Fri, 13 Sep 2002 17:07:53 -0800
MIME-Version: 1.0
In-Reply-To: <JJEKIDCEKEJHNKBCPHPBOEEHCFAA.JOHN@FUSIONTECHNOLOGY.COM>
Organization: Shadownet
User-Agent: rnr/2.50
Reply-To: opendos AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: opendos AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

In mail (today) you write:

> Does anyone know the DOS command for copying entire directories with their
> subdirectories from a hard drive to another drive?

Depends on the version of DOS *and* what command interpreter you are
using. 

With the 4dos interpreter:

	copy  C:\dir1\dir2 d:\dir\3 /s

or replace "copy" with "move" if you want to move them.

Otherwise, you need to use Xcopy. Paramaters vary a bit with OS
version. One thing to check is to make sure that either the destination
directory exists (the subdirectories will be created ok) or use the
xcopy option that forces creation of the directory. Otherwise you can
get everything copied to a single file. <ick!>

-- 
Leonard Erickson (aka shadow{G})
 shadow AT krypton DOT rain DOT com        <--preferred
leonard AT qiclab DOT scn DOT rain DOT com     <--last resort

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019