Technical Support

File Recovery Script

VersaForm Systems

File Recovery Script

When a file is damaged but not irretrievably lost, the file recovery facility can often recover the data or correct indexing problems. It does so by reading through the file, identifying recoverable records, and then writing them to a new file.

A file recovery is called for when you get an error message that says you have a woring form type, or a form could not be read or the indexing is incorrect (you move from c to s instead of d).l


Note : File recovery can be run on any VersaForm file. For this illustration, however, we will assume that the file name of your damaged file is "LEDGER.VFM" and that it is located in the "C:\VF " directory. Substitute as needed for the file name and the directory name.


  1. If you are on a multi-user system (a computer network), make sure no one is using or trying to access the damaged file LEDGER.VFM.

WARNING: Be sure you have a valid back-up before beginning this process!


  1. Exit to the DOS command line. If you are using VersaForm version 6.01 and above, press "Alt" + "U"" and select the "Shell to DOS" option on Utility Menu. If haven't upgraded to version 6, then exit the program.
  2. Your DOS command line prompt may read C:\VF>. If your computer uses some sort menuing management program, you may not end up at the DOS command line. If so, call technical support.
  3. From the DOS command line type "DIR LEDGER.*" and hit enter. If you are in the correct directory you will get a listing similar to theone below:

Directory of C:\VF

LEDGER OLD 1476388 04-28-94 3:39p

LEDGER PRO 1731 02-28-92 6:00a

LEDGER RPT 1834 03-19-92 6:01a

LEDGER TUT 626944 03-23-93 7:35a

LEDGER VFM 1876288 05-13-95 9:21a

5 file(s) 3383085 bytes

15726208 bytes free

  1. Before proceeding, make sure that the bytes free (remaining hard disk space) is larger than LEDGER.VFM. For this example, we will need about 2,000,000 (2 megabytes) of space. Since we have 15.7MB free, we can proceed.
  2. Rename LEDGER.VFM to LEDGER.OLD. If you already have a file named LEDGER.OLD, it must be deleted before you can successfully execute the RENAME command.

WARNING: If the file LEDGER.OLD contains information that should not be deleted, stop here and call Tech Support for assistance!


To delete LEDGER.OLD, enter "DEL LEDGER.OLD"

To rename LEDGER.VFM, enter "REN LEDGER.VFM LEDGER.OLD"

If you get the message "Sharing violation", it means that someone in your computer network is still using the file. Make sure that the file is not up on anyone's screen or that it is being used for a report.

  1. After you have completed the renaming of the file, again enter "DIR LEDGER.*"

Directory of C:\VF

LEDGER PRO 1731 02-28-92 6:00a

LEDGER RPT 1834 03-19-92 6:01a

LEDGER TUT 626944 03-23-93 7:35a

LEDGER OLD 1876288 05-13-95 9:21a

4 file(s) 2906697 bytes

17202596 bytes free

Check the date and size of the "new" LEDGER.OLD. It should match what LEDGER.VFM used to be.

  1. If you are running VersaForm version 6 and above, then type "EXIT" at the DOS command line to return to the system. For version 5 and below, bring up the system again.
  2. Select the option for VersaForm XL Main Menu from the MD VersaForm Main Menu.
  3. Choose "Option #7 VersaForm Utilities" from the VersaForm XL Main Menu.
  4. Choose "Option #7 File Recovery" from the VersaForm Utilities menu.
  5. Answer "Y" to the question, "Do you wish to create a new file? ".
  6. "Enter the drive letter or path name of your file." The system is asking for the path of your new file. Press "Enter" to accept the default or, enter the correct path of LEDGER.VFM.
  7. "Enter new file name:." Enter "LEDGER.VFM" for the file you are recovering TO.
  8. "Enter the drive letter or path name of your file" Enter the appropriate path of your damaged file. You can press "Enter" to accept the default if LEDGER.OLD is in the same directory as LEDGER.VFM.
  9. "Enter file name:." Enter "LEDGER.OLD" for the file you are recovering FROM.

The File Recovery Utility is now rebuilding your damaged file. Your computer may beep and ask you to press enter several times through this process. If it does, press "Enter" to continue.

  1. Exit the VersaForm XL Main Menu and examine your rebuilt file, LEDGER.VFM, thoroughly. For example, if you could not retrieve certain records from the index list previously, check to make sure they can be retrieved now. If you saw duplicate items in reports, run the same report and confirm that this is no longer happening. This is the time to make the necessary checks to be satisfied with your rebuilt file. If you feel uncertain for any reason, call Tech Support.

The VersaForm Support Policy does not cover hardware, operating systems, or software not produced by VersaForm Systems Corporation.  We hope the information supplied will provide a solution to your non-VersaForm issue.  If you do not understand the above or if it does not solve the problem you are experiencing, please contact a technical person in your area or the vendor of the hardware or software you are using.

Email your support questions to tech@versaform.com

This information is provided as a courtesy.  VersaForm Systems Corporation has provided this information "AS IS" without warranty of any kind – express or implied.  In no event shall VersaForm Systems Corporation be liable for any damages whatsoever including direct, indirect, incidental, consequential, loss of business profits or special damages.