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

Number : 77 Date : 2001-05-17 Author : Jim Witherspoon Subject : Re: /WD switch -> a Quiz Size(KB) : 1
Kan, I like your quiz! Let me see if I can give you the right answer. > XXCOPY C:\mydir D:\dest /I /S /E When XXCOPY does not find a directory named "mydir" in c:\, XXCOPY assumes you intended to use "mydir" as the file template part of the source specifier. Then it looks through all the directories in C:\, looking for files named "mydir". There are no files named "mydir" anywhere in the directory tree, so none are copied. But along the way, because the /E switch was specified, all of the directories under C:\ are copied to D:\dest - empty directories. Now, why are all those directories (which do not contain a file named "mydir") considered to be "empty directories" -- which are therefore copied because the /E switch was specified? I guess XXCOPY considers them to be "empty" because they didn't contain any files matching the specified file pattern ("mydir"), even though they may have contained other files. XCOPY shows the same behavior. If the /E switch isn't used, no empty directories are created under d:\dest - but XXCOPY still goes looking through all the directories for files named "mydir" Putting a backslash after the source directory - xcopy c:\mydir\ d:\dest\ saves a lot of trouble. It specifies that you are looking for a directory named mydir, not a file named mydir, and XXCOPY aborts quickly without doing a futile search for files named "mydir". Is there any reason NOT to use a trailing backslash on the source and destination directories? It seems like it would always be the safest thing to do. jim
This message if part of XXCOPY's message Archive. The archive contains all the messages posted at Yahoo!Groups: XXCOPY.