Otto,
Your question is not easy to answer. But I'm gonna give it a try.
You need to know that this procedure is used to update DBF-files.
First of all I have an update-folder with all my DBF-files. Each record contains 1 record. All fields have the default value.
My update-application opens a file in the standard data-folder and it opens the same file in the update-folder containing the default record.
The recordlayout of both files is compared.
If there is no difference in the recordlayout, both files are closed and the procedure continious with the next file.
If there is a difference in the recordlayout, the old file is renamed to a temporary name and a new file is created with the same recordlayout as the one in the update-record. Then all the non-deleted records of the temporary files are copied to the new file. The new fields get the default value of the file in the update-folder. Finally all files are closed and the temporary file is deleted after which the file is reindexed.
The result : the new file contains all the data in a new recordlayout.
If a file does not exist in the data-folder, a new empty file is created.
This procedure is repeated for all the files.
I hope my explanation is understandable.
If any questions, don't hesitate to ask.
Good luck.