You can perform a virtual save operation during the course of editing a file, using the primary command VSAVE. A virtual save will save the edit session to a temporary file, without committing the edit changes to the original permanent file you started out editing. If you are editing a critical file and experience a system outage, the VSAVE files can be used to resume editing, while if the edit ends normally, the VSAVE files are automatically deleted.

Note: if the requirement to maintain the original contents of the file as it was prior to the edit session is not important, then simply doing periodic SAVE commands would suffice. This can be automated using the ACTION function, review it for further details.

The intended purpose of a virtual save is to save works in progress without losing the contents of the original file. One might be performing some critical work, and may wish to frequently save it as a precaution against data loss. However, if the file is frequently saved in this way with the SAVE command, the original contents would be lost, in favor of saving a modified version of the file. It is possible for you to save the original file as a backup in another directory, or to make a copy under another name. Such methods have the drawback that management of such backups must then be done manually, a process that is often haphazardly done and can leave behind many spurious backup files that (once no longer needed) must be cleaned up or else they will take up disk space.

The VSAVE technique avoids the creation of spurious backup files, by internally managing temporary VSAVE files. You can VSAVE a file as many times as you wish, and the original file will remain unchanged. Once you are satisfied with your changes, you can SAVE the file, or END the edit session (assuming AUTOSAVE is enabled) and SPFLite will remove the temporary VSAVE file.

SPFLite creates a VSAVE directory underneath the SPFLite main directory. A VSAVE file name has a structured format, as follows:




               is a constant prefix of the file


is the time and date when this VSAVE file was first saved; the format of this timestamp is YYYYMMDDHHmmSShh, for year, month, day, hour, minute, second and hundredth of seconds. Once a given edit session has been VSAVE'd, the timestamp for the VSAVE file does not change.


is a modified form of the full path and name of the file being VSAVE'd. Because a full path name of a real file contains backslashes and a colon after the drive letter, such a string is not suitable as part of a simple file name. To accommodate this, the full path name of the subject file is modified so that the :\ colon-backslash after the drive letter is converted into a single dot, and all other backslashes are converted to a dot. This convention is sufficient to ensure uniqueness of the VSAVE file name, while giving it a readable name that will be recognizable when viewing the VSAVE directory.

For example, if a file named C:\MYPATH\MYFILE.TXT were VSAVE'd, the VSAVE file might be called VSAVE.2012012822375729.C.MYPATH.MYFILE.TXT.

Other than the structured name and the directory where it's placed, there is nothing special about the contents of a VSAVE file. The data in a VSAVE file is byte-for-byte identical to a file saved using the SAVE command.

In the event of a system interruption that leaves behind undeleted VSAVE files, SPFLite will inspect the contents of the VSAVE directory during the next SPFLite startup. If existing VSAVE files are found that are more than two days old, these will be deleted. This means that under normal conditions, you will not need to worry about maintaining these files or about spurious VSAVE backup files needlessly taking up disk space.

At the same time, you will have a means to recover your work from the last VSAVE performed, if this becomes necessary. The recovery process would involve a manual inspection of the VSAVE directory, deciding which (if any) of the VSAVE files left behind are important enough to recover, and then to move these files to other directories as needed, at which point you most likely would rename such files to a more conventional file name format.

You do not need to set up or enable the VSAVE feature; it is always available to you. Your only decision is whether, and how often, you wish to issue the VSAVE command during your edit sessions.

In most cases, users will find the standard save commands SAVE, SAVEAS, SAVEALL, CREATE and REPLACE to be sufficient.

Where VSAVE is mostly likely to come into play is as follows:

    • you need to edit large files
    • you need to make many (possibly time-consuming) changes
    • the changes are of critical importance
    • system reliability is an issue
    • your file is stored externally, such as on a network or an FTP server
    • you wish to be prepared for any eventuality
    • you prefer not to manually manage the creation of backup files
    • you wish to have a means to frequently save interim edit changes
    • and, you wish to be able to back out of the entire edit task if something goes wrong

These are all requirements of a mission-critical production environment, not the casual, every-day editing of a typical text file. These are the kinds of circumstances where VSAVE may benefit you.

Created with the Personal Edition of HelpNDoc: Generate Kindle eBooks with ease