PCLaw Backups: Generating a Table List

PCLaw Backups: Generating a Table List

The following instructions will help you create a table list from PCLaw.

Locate the PC Law Data

To find out where the PC Law data exists, find a PC Law shortcut, right-click on it, and choose "Open File Location".



Repeat this process until you are in a location similar to the following.  Then double-click on the LOCALDATA folder.

 

Open the PCLaw.cf file:


And you will see the following relevant locations:

 

Navigate to that location.

If you need a comprehensive backup, create a ZIP file of everything in that location.

If you only need practice management data, go into the Data subfolder and create a ZIP of just the DynData and StatData files:

Create a Table List

PCLaw uses the FAIRCOM CTREE database format.

The following PowerShell script generates a table list which you can then use to connect to FAIRCOM ODBC.

When you configure FAIRCOM, you must set the following options:

Alignment: 1 Byte 

  1. $ROOT = "D:\ServerFolders\Company\PCLaw\DATA"
  2. $OutputFileName = "$ROOT\PCLAW.DB.txt"

  3. $Folders = @(
  4. "$ROOT\dyndata",
  5. "$ROOT\statdata"
  6. )


  7. $Files = $Folders `
  8. | Where-Object { [System.IO.Directory]::Exists($_) } `
  9. | Get-ChildItem -Filter *.dat `
  10. | Where-Object { $_.Name -inotlike "TTE*" } # Ignore temporary tables

  11. $Files


  12. $Lines = $Files `
  13. | ForEach-Object { [System.IO.Path]::GetFileNameWithoutExtension($_.FullName) + " " + $_.FullName }

  14. [System.IO.File]::WriteAllLines($OutputFileName, $Lines)