A computer-implemented process for replacing old files having old names on a
permanent
storage medium with new files in volatile memory. Some of these files may be opaque
files, which are old files that have become new files without undergoing any changes,
other than possibly name changes. The primary steps of this replacement can include
first saving the non-opaque new files onto the permanent storage medium and assigning
them temporary filenames. An opaque recovery file listing the old name and a temporary
name for each opaque file is created. A primary recovery file listing the temporary
name and a final name for each new file is created. After the names of the opaque
files are changed to their temporary names, the names of the non-opaque old files
are changed from their old names to backup names. Then, the names of the new files
are changed from their temporary names to their final names. The recovery files
and the old files can be deleted. If an event leaves the program performing the
primary steps in control but unable to complete the replacement, then the old files
can be restored to the permanent storage medium. If an event prevents completion
of either a replacement attempt or a restoration of the old files, completion of
the replacement can again be attempted at a later time using the recovery files.
The described processes can be applied to saving HTML documents, each of which
typically includes multiple files.