[<<]Message[>>]    [<<]Author[>>]    [<<]Subject        [<<]Thread    

Number : 3190 Date : 2002-12-03 Author : Kan Yabumoto Subject : Re: copying directory structure Size(KB) : 1
The /SC switch is an advanced feature only for NTFS to NTFS copying with security info to be transferred. But, before getting into the advanced feature, let us start with the basic. /S // subdirectories included (but not empty directories) /E // subdirectories even if it's empty An /E has an implicit /S in it even without having a /S switch. So, your command line should be xxcopy c:\test\ e:\ /S Will copy all files and subdirectories inside the c:\test\ dir. Note that I added the trailing backslash to the source directory name. This is due to the fact that the command line syntax has a mostly-undesirable ambiguity. When you say xxcopy c:\test e:\ /S The command could be interpreted in two ways: 1. source directory: c:\test\ filename pattern: * (everything) 2. source directory: c:\ (the root == the whole volume) filename pattern: test (even without a wildcard) The distinction of the two is made by testing the object, C:\test as you entered. If it exists and if it is a directory, Case 1 will be chosen (as you intended). But, if C:\test is either a file in the root directory, or no such object (file or directory) exists in the root directory, then, it will be interpreted in Case 2 (with a warning because this is a root directory case). The ambiguity is inherited from Microsoft's Xcopy and we cannot do anything about it. But, there is a simple method to avoid this ambiguity. Just form a habit of adding the trailing backslash whenever you mean it to be a directory name. Note any name could be a filename pattern even without a wildcard. Kan Yabumoto ============================================================ At 2002-12-03 13:35, you wrote: >I'm playing around and can't seem to figure out how to copy a parent >dir. > >Example: xxcopy c:\test e:\ /SC > >What I want is for the "test" dir and everything below to be copied, >but so far I only get the contents of "test" and not the >actual "test" folder. > >Am I missing something simple? > >Thanks
This message if part of XXCOPY's message Archive. The archive contains all the messages posted at Yahoo!Groups: XXCOPY.