![]()
[<<]Message[>>] [<<]Author[>>] Subject[>>] Thread[>>]
Number : 7132 Date : 2004-02-02 Author : Ray McCormick Subject : Keep previous version Size(KB) : 1
I have developed a backup scheme that will keep the old version of a file in a dated folder (The date that the file would be overwritten). This is useful for 'live' files such as accounts.xls where. if the file got garbled, it is undesirable to finish up with two copies of the same garbled file! The bare bones of my current scheme: 1. Parse today's date (Adapted from Garry, message 4409) 2. Menu 3. SET variables SRC, DST, (The normal backup to folder: Volume\path\) DST2, (The dated folder for the previous version: Volume\%yy%%mm%%dd%\path\) ErrorLog 4. Do it: xxcopy %DST% /AZ/S/H/R/oA%ErrorLog% // clear all the A- bits first xxcopy %DST% %SRC% /AA/S/H/R/Bo/oA%ErrorLog% // tag the A-bit for newer on SRC ones; xxcopy %DST% %DST2% /RC/A/S/H/R/YY/oA%ErrorLog% // Remove after copy xxcopy %SRC% %DST% /BU/BN/oE2/oX2/oA%ErrorLog% // do the normal backup I would much prefer to rename the old version of a file with its last accessed date prepended to the file name and save it in the same folder as the current backup (DST). Alternatively the date it would have been overwritten could be substited for the last accessed date. Is this possible with xxcopy, or xxcopy and other cmd line statements? Ray
This message if part of XXCOPY's message Archive. The archive contains all the messages posted at Yahoo!Groups: XXCOPY.