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

Number : 4786 Date : 2003-06-10 Author : Garry Deane Subject : Re: xxcopy /RC ? Size(KB) : 1
--- In xxcopy@yahoogroups.com, "haukalid" wrote: > I have a directory tree where i want to copy all files > to a network drive, and then delete the source files and > keep all of the directories and the files in one of them. > Like this: > > copy c:\dir1\dir2\dir3\dir4 to f:\xx\ > then remove files in c:\dir1\dir2\dir3\dir4 > and keep all of the empty directories and the files > in dir c:\dir1\dir2\ > What is the easiest way to do this? I'm not too clear on exactly what you want to do. To copy all the files in ..\dir4\ and below then delete those files but not the empty directories try this: xxcopy c:\dir1\dir2\dir3\dir4\ f:\xx\ /s/h/r/rcy/ed/po0/pd0 The key switches are: /s to process subdirectories /rcy to delete files after copying /ed to preserve empty directories Add a /? to the end of the command to get a brief in-context explanation of all the switches used. This command doesn't copy or delete any of the files in ..\dir2\ but I'm not sure what the significance of ..\dir2\ is. If in fact you want to copy all the files from ..\dir2\ and below but only delete those in ..\dir4\ and below, you'll need to carry out 2 xxcopy commands. The first would do the copy but no deletion specifying ..\dir2\ e.g. xxcopy c:\dir1\dir2\ f:\xx\ /bu/pd0 The second would do the deletion with /RSY specifying ..\dir4\ e.g. xxcopy c:\dir1\dir2\dir3\dir4\ /s/h/r/rsy/ed/pd0 Garry
This message if part of XXCOPY's message Archive. The archive contains all the messages posted at Yahoo!Groups: XXCOPY.