Please enable JavaScript to view this site.

Vensim Help

Navigation: Reference Guide > Text Editor

Backup File-Naming Conventions

Scroll Prev Top Next More

When you edit a file, Vensim creates three files in addition to the file you are editing.  

A temporary backup file.  
A history file, which is added to each time you edit a file (as long as you have not set Text Edit History to Off in the Global Options dialog).  
An old version of the file you are editing.  If a previous version of the file exists when you save the file, the old version is saved.  

Backup.  The backup file has the same name as the file but the file extension is prefixed with the number zero 0.  Under Windows 3.1 if the extension has three characters, the last character is dropped  Thus world.vmf has a backup file named world.0vm (world.0vmf on Windows 95 and the Macintosh) and mdl.c has a backup file named mdl.0c.

History.  The history file has the same name as the file with the number one 1 at the beginning of the extension.  Under Windows 3.1 if the extension is three characters long, the last character is dropped.  

Old Version. If you have set a backup path in the tab of the Options dialog, Vensim attempts to place the old version of the file in that directory.  If Vensim fails to do this, or if you have not specified a backup directory, the old version has the same name as the file with the number two 2 at the beginning of the extension.  Under Windows 3.1 if the extension is three characters long, the last character is dropped.  

NOTE The backup path you specify should not contain a drive or volume name.  Vensim will attempt to put the file in the path on the drive you are currently using.  If this path does not exist or is otherwise not accessible, Vensim will fail to make the backup and make a local backup instead.

Recreating Versions of Files

In addition to providing a  readable audit of what you have changed in a file, you can use history files to automatically recreate different versions of a file.  To do this, you must first archive an initial version of the file, then begin a new history file.  After you make changes to the file, go into the history file and delete everything after the version you want to recreate.  Rename this portion of this history file as a backup, then edit the initial version of the file.  The backup facility will be invoked automatically.  

For example, to track changes in world.cin, copy the file world.cin to world.one, which will be used as the reference file.  Delete world.1ci (the old history), so that the new history file is relative to the reference file.  Now make changes to world.cin.  Suppose you create seven new versions.  To use version 5, edit world.1ci and cut the information for the last two versions (everything below the second to last line beginning with #).  Save this as world.0fi.  Copy world.one to world.fiv, then edit world.fiv.  When you start the editor you will be asked if you want to attempt recovery.  Answer yes.  The result will be the fifth version of world.cin.