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

Number : 7764 Date : 2004-04-25 Author : Kan Yabumoto Subject : Re: How to make XXCopy delete extra files in Size(KB) : 3
Labcore wrote: > > Hi Kan! Thank you very much for your detailed answer > (I really appreciate how detailed your answers and > explanations use to be - in fact, XXCopy users have > two of their dreams turned into reality: access to a very > powerful, flexible file copy utility and a decent > customer support, as every one should be). > As expected, the two command lines above always worked > fine. But, as an effort towards the quest for an even > smaller and simpler batch file, I'd like to know if > XXCopy can do it all (both tasks) in just a single > step (that is, by providing me the possibility to > substitute those two distint command lines for just > only one, while getting the exactly same results > of both of them). Because the /RX switch doesn't > allow the copy process to start immediately after > the extra files are deleted and as the couple /RS/BB > requires that source and destiny are swapped to reach > the goal I'm looking for, I have no option but to write > a second command line just for the copy (or synchonization) > job. The /ZY command as originally written should do the job. xxcopy \src\ \dst\ /BN/ZY (with more switches). As I said, the /ZY operation will perform the deletion on-the-fly (not as a separate pass). This should not cause any problem except when your destination volume has little room to absorb some up-and-down in the remaining space (potential problem when the space in the destination is too low). (Note: In general, I personally think /BI/ZY a better choice than /BN/ZY since newer files are not always what the user may want. But, it is up to the user to make the final decision.) > So, the ideal solution (as far as I can wonder) would > be getting /ZY to delete ALL extra files in destiny > (in just a single, sequencial task) just *before* the > file copy from source to destiny started (and not > *during* the file copy process)... E.g.: if there > were 50 extra files in destiny to be erased (even if > they were in different folders throughout the destiny's > logical structure), all those 50 files should be deleted > in a row; only after they're were gone, then the file > copy process would start. Could a "fix" to the /RX > switch be done so that it could accomplish this behavior > or is there some existing workaround for this issue that > I'm not aware of? (I"m repeating what I already wrote.) If the requirement in your operation is to delete everything first before start copying anything to the destination, the one-step operation is not what you want. Make the two line batch file as I suggested in the first place. There is absolutely nothing wrong to write a two-line batch file if that improves the overall performance (I'm not talking about the speed or the conciseness at all. I'm talking about the ability to achieve the ultimate goal of what need to be done). Therefore, I challenge your definition of what's "ideal" of making it into a single command is simply misguided. Our design goal is not to squeeze everything into one-line. That would make the number of switches to even a much larger number --- a not good design. We do not really boast the total number switches per se. We want to provide the maximum flexibility with a reasonable number of switches by carefully avoiding making things unnecessarily complicated. When two-line solution perfectly serves the purpose, that is the correct solution. Again, if your destination volume has too little room to absorb the temporary surge of storage requirement and may reach an "out-of-room" condition, you should correct the problem at the heart --- put more storage capacity.
This message if part of XXCOPY's message Archive. The archive contains all the messages posted at Yahoo!Groups: XXCOPY.