Re: Saving an OTL file Ratchet-style
- Answers in context
--- In email@example.com, "RoyB" <rrbeatty@...> wrote:
> (NoteTab Pro 6.2/fv on Windows 7 Enterprise 64-bit)
> Therefore, I ask:
> (1) Is there an NoteTab option that can force a warning if saving an Outline (or other file) will cause that file to be smaller than it is currently ?
No. But Alec has already provided the alternative backup method, but see below.
> (2) If not, then is there a way to (a) Write a NoteTab script to check relative file sizes and if all's well save the file; (b) Have the Save icon run that script instead of what it's doing now; and (c) Have the "Automatic save every (n) minutes" use this rachet-style saver script ?
Yes. This is best used in concert with the "incremental" backup technique.
You want to load all backup files into an array, sorting by date (see ^$GetFiles in Help), loop the files to get their size ^$GetFilesize()$, and delete files as long as their size is smaller than the next.
> (3) Or does anyone know of a third-party utility or tool that I could configure to prevent a .BAK file from being over-written by a smaller version of that file ?
The thrid-party utility to check out is Revision Control software.
Wikipedia has a nice comparison chart:
Several freeware versions. If you have Visual Studio, it comes with it's own, which you could use for NoteTab files.
Any good revision control keeps copies of all changes you make, and can restore to any eralier version. You can also "fix" the original version periodically, to discard much earlier versions. This is better than NoteTab's incremental backup, but a bit more tedious to use, as you must check files in and out, to use the revision control.