Bodhi Freeway 2 Tutorials
Errors when exporting to MetaStock

Below are a few problems and solutions to errors when exporting to the MetaStock format. It is not uncommon for MetaStock files to become corrupted. Corruption can occur for many reasons:

  1. When the files are not closed tidily (such as in a PC crash).
  2. When the hard disk is getting old and the heads crash.
  3. When the power supply is supplying power out of acceptable limits (spikes, power drops).

The only way around the problem (out of identifying the exact cause) is to backup the c:\My Database directory regularly, then when a problem occurs you can restore the data from the backup and re-process from the last date of the files.


Problem: Deleting corrupted Files in MetaStock.

Solution: If you do not now which file is corrupted in your MetaStock directories, please refer to the Invalid argument to date encode tutorial to find out. There are two ways you can deal with this problem: either ignore the symbol in Bodhi Freeway 2 or delete it using 'The Downloader' in MetaStock.

    Ignoring a corrupt symbol using ASX code BHP as an example:
  1. Open Bodhi Freeway 2.
  2. Click the Finance button.
  3. Click on the + next to Australia and the + next to Australian Stock Exchange.
  4. Click on Equity.
  5. Locate BHP in the list and click on it (so it is highlighted).
  6. Go to Edit>Ignore.
    Result: This will remove BHP from the list and stop Bodhi Freeway 2 from trying to update it. The BHP file will still remain in your MetaStock database.
    Delete the file using 'The Downloader':
    'The Downloader' is a file management tool that comes with MetaStock.
  1. Start The Downloader (this can be achieved from using the Tools>The Downloader menu from within MetaStock).
  2. Go to Tools>Delete>Securities.
  3. Use the Browse button to find the directory the corrupt file is located in.

    Browse to the corrupted files directory

  4. Find the symbol in the list and click on it (so it is highlighted), then click the Delete button.

    Select the symbol, then click delete

    Result: This will delete BHP from your MetaStock database. The next time you download, Bodhi Freeway 2 will create a new BHP file in MetaStock and start updating it from that day forward. If you have a backup or Bodhi History CD (less than 6-months old), you can restore your data to this directory. Then you can use Bodhi Freeway 2 to bring the file up-to-date.


Problem: Overflow errors - too many files in a directory.

Solution: The MetaStock format has a limit of 2000 files per directory. Bodhi Freeway 2 automatically overflows into a new folder once this limit is reached (i.e. c:\MetaStock\ASX\Equities0 to c:\MetaStock\ASX\Equities1). You will experience problems in the case where another process, such as MetaStock, has saved extra data files into these folder thus increasing the file limit.

    To correct these problems:
  1. Start The Downloader (this can be achieved from using the Tools>The Downloader menu from within MetaStock).
  2. Go to Tools>Delete>Securities.
    We have found that these codes may not be in Uppercase. Bodhi Freeway 2 only loads the codes in Uppercase so you can delete any files in lowercase.
The other way around the problem is to restore the data from a Bodhi History CD or your own backup.


Problem: The MetaStock File Library has marked the files as in use.

Solution: You need to delete the lock files from the directory indicated.

  1. Open Windows Explorer.
  2. Navigate to the directory that contains the locked files.
  3. There will be between 4 to 6 files with ~msfl in the name. Delete all these files (for example: ~MSFL.LCK, ~MSFL.INX, ~MSFL.SEC, ~MSFL.USR).
  4. Once you have done this you will no longer have the error.


Problem: Restoring historical data after deleting corrupt files.

Solution: If you have had to delete a MetaStock file, due to it being corrupted and now wish to reinstate the data, you will need either a Bodhi History disk (no less than 6-months old) or your own backup. If you have neither of these and don't wish to purchase a updated Bodhi History CD, you can still download 6-months of history from our server.

    Downloading 6-months history from our server:
    Using the ASX code: BHP as an example.
  1. Open Bodhi Freeway 2.
  2. Click on the Finance button.
  3. Click on the + next to Australian then the + next to Australian Stock Exchange.
  4. Click on Equity.
  5. Change the Bundle to None.
  6. Locate BHP in the list and tick the corresponding box.
  7. Put the Imported and Exported dates back 6-months.
  8. Exit all screens until you return to the initial window (where the Catchup button is located).
  9. Connect to the Internet and click Catchup.
  10. If asked to 'adjust the data', select No.
  11. After Catchup is finished, go back into the Equities list and select All in Bundle and remove the tick from BHP.
    You will now have 6-months history on BHP.
    Restoring data from a Bodhi History CD:
    Using the ASX code: BHP as an example.
  1. Open Bodhi Freeway 2.
  2. Click on the Finance button.
  3. Click on the + next to Australian then the + next to Australian Stock Exchange.
  4. Click on Equity.
  5. Change the Bundle to None.
  6. Locate BHP in the list and tick the corresponding box.
  7. Exit out of Bodhi Freeway 2.
  8. Put your Bodhi History CD into your CD-ROM drive.
  9. The disk will start automatically, displaying a install screen.
  10. Click on the Bodhi History link.
  11. Read the Legal Information then click the I Agree button.
  12. Read the Overview then exit the screen by clicking the x.
  13. Select the Use Bodhi Settings option.
  14. Select Bodhi 2 then exit the screen by clicking the x.
  15. The Bodhi History software will appear.
  16. Go to File>Load>Finance>ASX>Equity.
    This will load only the BHP file we have selected. When finished, exit out of the Bodhi History software.
  17. Open Bodhi Freeway 2.
  18. Click on the Finance button.
  19. Click on the + next to Australian then the + next to Australian Stock Exchange.
  20. Click on Equity.
  21. Locate BHP in the list and click on it, so it is highlighted. Then go to View>Values.
  22. A spreadsheet will appear showing daily data for BHP. Use the scroll bar to go to the bottom of the spreadsheet. Take note of the last day the file is updated to then exit this window.
  23. Change the Imported and Exported date back to this date.
    Please Note: this can not be more than 6-months ago.
  24. Exit all screens until you return to the initial window (where the Catchup button is located).
  25. Connect to the Internet and click Catchup.
  26. If asked to 'adjust the data', select No.
  27. After Catchup is finished, go back into the Equities list and select All in Bundle and remove the tick from BHP.
    Your history for BHP is now restored.
    Restoring data from your own backup:
    Using the ASX code: BHP as an example.
    You will need to use 'The Downloader' software to copy this file into your database.
  1. Start The Downloader (this can be achieved from using the Tools>The Downloader menu from within MetaStock).
  2. Go to Tools>Copy.
  3. Use the Browse button to find the directory the corrupt file is located in on your backup.
  4. Select the file then click Copy.
  5. Use the Browse button to find your MetaStock data directory where the file normally resides (i.e. c:\My Databases\MetaStock\ASX\B0.
  6. Click OK.
  7. Exit The Downloader and open Bodhi Freeway 2.
  8. Click on the Finance button.
  9. Click on the + next to Australian then the + next to Australian Stock Exchange.
  10. Click on Equity.
  11. Change the Bundle to None.
  12. Locate BHP in the list and tick the corresponding box, whilst it is highlighted go to View>Values.
  13. A spreadsheet will appear showing daily data for BHP. Use the scroll bar to go to the bottom of the spreadsheet. Take note of the last day the file is updated to then exit this window.
  14. Change the Imported and Exported date back to this date.
    Please Note: this can not be more than 6-months ago.
  15. Exit all screens until you return to the initial window (where the Catchup button is located).
  16. Connect to the Internet and click Catchup.
  17. If asked to 'adjust the data', select No.
  18. After Catchup is finished, go back into the Equities list and select All in Bundle and remove the tick from BHP.
    Your history for BHP is now restored.