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

Number : 4020 Date : 2003-03-10 Author : Garry Deane Subject : Re: Need help synching several sources to one reference dir Size(KB) : 1
--- In xxcopy@yahoogroups.com, "obarthelemy" wrote: > Hi. > I have several "feeder" PCs with a %computername%\files > dir (no subdirs) and a "reference" directory on a USB > hard disk that I move from feeder to feeder. The USB HD > holds the files from different "feeders", re-arranged > manually in various subdirs. > > I want to delete the files from the feeders > (d:\%computername%\files) that are already in the > reference (g:\files\) *EVEN IF THEY ARE IN A SUBDIR > OF G:\FILES* , then copy the remaining files from to > g:\files\new. > > I couldn't find a way to tell xxcopy copy to delete files > from the source if they already are on the destination *IN > A DIFFERENT SUBDIR* You might be able to use the directory gathering switches to effectively flatten the source directory structure then examine the destination to see whether any files already exist which are candidates to be deleted. Note that this will only work correctly if the file names in your reference directories are unique. For example, d:\%computername%\files\abc.txt might be deleted if it exists in g:\files\fred\abc.txt whether they are the same file or not. The following will remove all files in d:\%computername%\files\ which already exist in g:\files\ or a sub-directory of g:\files\ and have the same size and time. xxcopy g:\files\ d:\%computername%\files\ /sg/rd/be If this does what you want, add the switches to suppress the deletion prompts and add a command to copy any files remaining to g:\files\new. Garry
This message if part of XXCOPY's message Archive. The archive contains all the messages posted at Yahoo!Groups: XXCOPY.