Circular Archive
Backups are important. There are many programs to backup your data. Some of them will save only the latest version, some of them also save previous versions. I use both systems. The system that backs up only the latest copy is easier to recover.
If your backup system saves previous versions, then you probably do not need this utility, if it saves only the latest version, then read on.
A backup of the most recent version is important in case of a disk crash or if you inadvertently delete the file and can’t recover it.
There is a vulnerability to this system in that if the file gets corrupted and you back it up, you now have a backup of a corrupted file. There may also be some other reasons that you might also want to keep several versions of recent copies.
You could make a copy of the file with a date stamp on it and save it to the archive. This way you will have every version of the file ever created. This archive will grow forever. Chances are you might not be interested in the version that is a year old.
Although I backup all my files, there are only two that I archive: a checkbook program that I archive weekly and a weight management program that I archive daily.
What this program does is provide what I call a “Circular Archive.” That is, you can specify how many archive files you want. The program overwrites the oldest one and moves it to the bottom of the queue. I keep the latest 5 copies of each of my archives.
To use this program, you need three things:
• The directory name where you wish to store the archives
• A file name “template” using wildcards. For example, Backup ??.xlsb
• Actual archive fileso Go to the directory where you want the files and create as many files with the template name as you need. For example if you want 5 archives, create:
Backup 01.xlsb, Backup 02.xlsb, Backup 03.xlsb, Backup 04.xlsb and Backup 05.xlsb.
o It does not matter that these are blank; they will be overwritten eventually.
You have to embed this code into the file you want to archive. You will need both the oldest file code and the ArchiveFiles code into a module. Change the first two lines in the ArchiveFiles subroutine to suit your needs.
Bookmarks