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

Number : 4611 Date : 2003-05-17 Author : Kan Yabumoto Subject : Re: Command for NOT Same Date/Time Size(KB) : 4
At 2003-05-17 07:49, you wrote: >What command switch would I use to say copy all files that exist on both the >source and target (same file name) but the date/time are not the same? >Peter The selective file-copy operations in general are grouped in the "backup" group of switches that start with the letter B. To get a quick list, run xxcopy /bb /? (or its equivalent) and you will get the following display which is a good way to retrieve the same info the next time. Backup variations -------------------------------------------------- /B0 Ignores file time and size in Destination /BB Excludes a file if it already exists in Destination /BI Excludes a file if it already exists with same time and size /BN Excludes a file if existing file is older or the same time /Bo Excludes a file if existing file is newer or the same time /BX Excludes a file if existing file is within the fuzzy range /BZX Excludes a file if existing file is same size (same as /BZ) /BZL Excludes a file if existing file is same or smaller in size /BZS Excludes a file if existing file is same or larger in size /BZE Excludes a file if existing file is different in size /BE Excludes a file if existing file has different size or time /BS Excludes a file if it is not identical to the one in dst ------------------------------------------------------------------- the closest one to the question is /U /BX The /U switch excludes the "brand new" files (the ones which exist only in the source directory) and can be combined to any of the /Bxx switches whereas the switches within the group are mutually exclusive. But, its silly to skip files whose filetime matches but the size does not. Therefore, /BI is superior to /BX in most circumstances. So, improved one is /U /BI But, the question does not address other issues such as... hidden/system file --- add /H read-only file in the destination ---- add /R .. and so on. To make your life easier, XXCOPY combines most such common-sense backup-related switches into an easy-to-remember shortcut. /BACKUP (or /BU for short) substitutes /KS/H/E/R/Q/Y/BI/ZE (but this one includes "brand new" files). So, the best one for you is... /U /BACKUP (or /BACKUP /U) -------------------------------------------------------------- Let me remind one thing. What I did for you is to spoon-feed you with a targeted answer which is specific to your current need. The info that I wrote here is simply an extraction of a lot more generalized and complete info that are published in the technical bulletins. XXCOPY has lots of features and that is why you are trying to use it. But, lots of features mean lots of documentation and lots of pain reading it. I guess a better question is like "What is the difference between using /BI and /BX? What I want to do is ..." You may stay with an easy-to-use GUI program (e.g., Karenware.com), or be a man who is not easily intimidated by the 2.5-inch thick Windows resource kit documentation. No pain, no gain. Peter, please do not be offended by what I wrote here. I know you wanted to engage in quick question and quick answer. But, I provided a lot more info than what you expected (the exact switch combination you needed). That is because of my belief in how people should teach and how people should learn. Instead of picking up one special case thing (which is good for only one type of operation), why not learning the mechanics of how different pieces are put together. XXCOPY's power is in the way it allows you to combine a set of primitive operations to achieve a customized behavior. Since it offers a rich set of switches, the number of useful combinations is really staggering. This reflects the reality; everyone's backup needs are different. Every now and then, I need to remind relative newcomers here the motto of this group -- the fish thing --- please go to the beginning of the xxcopy home page http://www.xxcopy.com And at near the top of the long page, locate the "SELF-HELP" section, and enter "motto" in the Keyword box. In the messages listed there, you should find a reference to the following lines -------------------------------------------------- Give a man a fish and feed him for a day, Teach a man to fish and feed him for a lifetime. -------------------------------------------------- Kan Yabumoto
This message if part of XXCOPY's message Archive. The archive contains all the messages posted at Yahoo!Groups: XXCOPY.