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

Number : 4393 Date : 2003-04-21 Author : Garry Deane Subject : Re: Blank Directories Size(KB) : 3
--- In xxcopy@yahoogroups.com, Kan Yabumoto wrote: > > Bob: > > Sorry to go back. But, I'm not sure what you really want. > > Are you saying you want to create many blank directories? > For what? Are you saying you wanted to duplicate a > directory to another with all the same component > subdirectories without copying any files? > > If that was your intention and your question was > > "How can I create a directory which has all the subdirectory > structure of the source but without any files?" > > My answer would be: > > xxcopy \src\ \dst\ /t/s/h > > the /T switch creates the directory structure (Tree) without > copying any files. > > Please use more words to explain what you want to do. > It is better using more words than necessary than using > less words than what's needed. > > (I'm not sure what you wanted and don't know you received > an answer from me. But, if you have no further question, > we don't need your rephrasing of your original intent > of your question. I just did not understand your real > question but I can drop this case if your happy with my > answer). Kan, I must admit I was similarly confused by Bob's question until his most recent post. What he is referring to is that Xxcopy will always create the destination base directory even when the are NO files to be copied. Take a simple example. There are no d:\temp\*.xyz files and the directory d:\test\ does not exist. D:\>xxcopy d:\temp\*.xyz d:\test\ XXCOPY == Pro Edition == Ver 2.84.0 (c)1995-2003 Pixelab, Inc. ------------------------------------------------------------------- Directories processed = 1 Total data in bytes = 0 Elapsed time in sec. = 0.001 Action speed (MB/min) = 0 Files copied = 0 Directories created = 1 <= Note this Exit code = 100 (No files were found to copy) Note that Xxcopy created 1 directory (D:\test\) but no files were found to copy so we end up with a new empty directory. This behaviour applies to the destination base directory but not to any destination sub-directories e.g. adding a /S to the previous command does not create any empty sub-directories of the destination base directory. D:\>rd d:\test D:\>xxcopy d:\temp\*.xyz d:\test\ /s XXCOPY == Pro Edition == Ver 2.84.0 (c)1995-2003 Pixelab, Inc. ------------------------------------------------------------------- Directories processed = 3 Total data in bytes = 0 Elapsed time in sec. = 0.01 Action speed (MB/min) = 0 Files copied = 0 Directories created = 1 Exit code = 100 (No files were found to copy) Even though there are 3 directories processed (D:\temp\ + 2 sub- directories), only the destination base directory (D:\test\) is created. This behaviour appears to apply to all Xxcopy operations (except /L) irrespective of the file selection switches or the structure of the source directory. Namely, even when there are no files selected, the destination base directory will be created if it doesn't already exist. I personally don't have a problem with this but I can see why it is not particularly desirable. Garry
This message if part of XXCOPY's message Archive. The archive contains all the messages posted at Yahoo!Groups: XXCOPY.