TFQA: Tools for Quantitative Archaeology - Statistical Analysis Software for Archaeology TFQA

TFQA: Tools for Quantitative Archaeology   +1 (505) 395-7979

TFQA Documentation
TFQA Orders
Kintigh (ASU Directory)

Running TFQA Programs Under Windows

(except graphics programs)

Running the Tools for Quantitative Archaeology under Windows is a bit unusual because these programs are all either DOS programs or true Windows console mode programs that do not (yet) have sophisticated file navigation capabilities. The essential thing is that the programs look in the proper folder for the data files you need and that they output files to the same place. Because of this, you need to do the setup described below.

The TFQA graphics programs (KMPLT, DIVPLT, LDPLT, BAYES, SCAT, and FORD) do not run directly under Windows 7 or more recent versions. They can be made to run well using DosBox a freeware emulator of 16 bit Windows. It is a bit of extra work to set up but does work fine--see Running TFQA Graphics Programs.

The instructions below apply to running the non-graphical TFQA programs (most of the programs) under Windows XP through Windows 10 and the graphics programs under XP. There are two ways to dio this.

Running TFQA Method 1

The first (and easiest) method is to copy the programs (.exe files) that you need into the folder in which your data files reside. At that point you can just double-click on the .exe files and everything works as desired. For any version of Windows, to copy (rather than move) the programs in Windows Explorer (or My Computer) to highlight the necessary .exe files in c:\TFQA, right click on them, and the select copy. Then navigate to the folder with your data files, highlight it, right click and select paste.

(Note that if drag and drop the programs from the TFQA directory, in Windows the program files are actually moved and they will no longer be there when you look later, which isn't fatal but will likely be an annoyance for you.

From that point, you can double click on the program name within the folder with the data files (from Windows Explorer or whatever) and it will start in a command window and will find the data files in that same directory. If you find that the program closes mysteriously, seemingly without doing what it is supposed to do, the program may have just finished quickly and closed the window. Alternately, you may be making some mistake and the program is closing the window, probably after giving you a message that disappears before you even see it. In either case, you'll need to use method 2.

Running TFQA Method 2

The second method involves more setup but is cleaner in the long run.

1. In the second method, you run the programs from a Command Prompt (MS-DOS Prompt) window. To use this method, the folder (directory) containing the programs must be in the system's current PATH command.

1a. To permanently change the path in Windows 7, 8, or 10, click on Start then in the search box type "environment" and in the results click on "edit the system's environment variables" and then click on the "Environment Variables" button at the bottom of the window. Then select the PATH command in the System Variable window and click on Edit. Click anywhere in the Variable Value text and hit the End key to go to the end of the string and add a semicolon and the location where you have placed the TFQA directory, e.g., ";C:\Program Files (x86)\TFQA" without the quote marks. Click on OK three times to close out the open windows.  You may need to restart the computer for this to take effect.

1b. To permanently change the path in Windows XP, click on Start, then select Control Panel, then double-click on System, click the Advanced tab and then click on the Environment Variables button. Then select the PATH command in the top window and click on Edit. Click anywhere in the Variable Value text and hit the End key to go to the end of the string and add the text ";C:\TFQA" without the quote marks. Click on OK three times and then close the Control Panel.   You will have to restart the computer for this to take effect.

2. Next you need to be able to open a command window within the folder that has your data files. This can be done directly in Windows 7 or later, or with a bit more trouble in earlier operating systems.

2a. In Windows 10.  In the Windows or Cortana Search box at the extreme lower left of the screen, type Run and <Enter>.  The Search will display, at the top, the Run App.  If you right click on Run in the search result you can pin the run comman to either the Start Menu or the TaskBar.  Or you can left Click on the Run app in the search result and that will open the run command window.

2b. In Windows 7 (and probably Vista) this is easy. Using Windows Explorer (Start>All Programs>Accessories) navigate through the file tree to the folder with your data files. Find the folder name in the file tree (on the left--not in the list of files that reside in the folder). Then while holding down the shift key, right click on the folder name. You then get a context menu, in which one of the options is "Open Command Window Here". You can then run the programs in the command window that is automatically opened pointing to this folder (meaning the program will find the data files contained in that folder).

2c. If you are running Windows XP, the free Microsoft CmdHere utility can be installed (run) or downloaded (save) from the Microsoft Powertoys web site. Once it is installed (double click on CmdHere.exe if you downloaded it), it is available on your computer all the time. Use Windows explorer to navigate to the folder with your data files, and then, with the folder (not a data file) highlighted, you right click and select "Open Command Window Here". You can then run the programs in the command window that is automatically opened pointing to this folder (meaning the program will find the data files contained in that folder).

Or use shortcut method provided in step 3.

2d. Or in XP and earlier Windows you can set up shortcuts to the command prompt on your desktop, or in some other convenient place:

2d1. To do this, copy the shortcut to the "Command Prompt" or "MS-DOS Prompt" icon from the Start menu Accessories Folder to your desktop. If one of these icons is not in the Start menu, try the Accessories submenu. To copy the shortcut, highlight the command name on the menu then right click and select Copy. Then click on an empty spot on the desktop. Then right click and select Paste. If it isn't there, you can create a shortcut to c:\windows\system32\cmd.exe (Windows XP) using Windows Explorer. Navigate to the proper folder for your operating system and highlight the appropriate .exe file, right click, and select "Create Shortcut." This creates a shortcut called something like "Shortcut to cmd.exe" within that same folder. Then drag that shortcut file (renamed if you like) to your desktop.

2d2. Once you have a Command Prompt shortcut on your desktop, highlight the command promt icon, right click, and select Properties. Change the properties of the icon so that the "start in" (Windows XP) folder is folder with your data files, (e.g. "c:\Documents and Settings\Your User Name\My Documents\Site Data\Ceramics" for Windows XP or "C:\Users\Your User Name\My Documents\Site Data\Ceramics"for Windows 7), then say OK and save your changes. You can have multiple shortcuts on your desktop pointing to different analysis folders, just make several copies of the Command Prompt shortcut icon and rename them to reflect the folders to which they point (e.g. "Ceramic Analysis").

2d3. Start a Command Prompt window by double-clicking on the appropriate "MS-DOS Prompt" or "Command Prompt" icon now on your desktop.

3. If you permanently modified the Path environment variable in step 1,then you run a program simply by typing its name, (e.g., kmeans) in the small run command window and then pressing <Enter>. In this mode you can run any number of analyses from a single window. You can go back and forth between other Windows programs (such as Notepad and the Command windows, either using the tab buttons across the bottom of your screen or by holding down Alt and pressing Tab. If you did not permanent modify the path in Step 1, type TFQAPath to get access to the programs (you need to do this each time you open a command promptwindow, but only once per window (not each time you run a program within the window). Then, you can type the program name, press Enter, and it will start.

4. To exit the Command window type EXIT then press Enter at the > prompt. If that doesn't work just click on the X at the top right of the window and reply OK to the warning message.

If you are working on a networked system and don't have write access to the folder (directory) with the data files, you will find it easiest to copy the program and data files to a folder to which you have both read and write access and then follow the above instructions.

File Names in TFQA

With the exception of the programs that directly produce graphics (see Running TFQA Graphics Programs in Windows), the programs are all Windows Console Mode programs that accept long Windows file names.

However, the DOS programs that produce graphics (DIVPLT, FORD, KMPLT, LDPLT, BAYES, SCAT, STP, COYOTE; those for which the .EXE file names are ALL CAPS in the TFQA directory), do not deal with ordinary Windows file names. File names used by these DOS programs are restricted, at most, 8 character file names (with no embedded spaces or special characters allowed except "_") followed, optionally, by a period and a 3 character extension (e.g., MY_DTA1.ADF). If you have files you want these graphics programs to read that don't meet these DOS conventions, you must rename them so that they do. Because the program interface always prompts for file names that you have to type (rather than selecting them from a menu) and because several key programs (divers, kmeans, and lden) interact with plotting program counterparts (notably DIVPLT, KMPLT, and LDPLT), you will want to stick with relatively short file names with 3 character extensions. Better yet, just use the DOS conventions of up 8 character file names(with no embedded blanks or special characters except underscore), followed by a 3 character extension.

Halting Program Execution in Windows

To stop a program running in a Command Prompt window hold down the <Ctrl> key and press <Break>. <Break> is the same key as <Pause> and is usually on the top row of the keyboard to the right of the function keys.

Printing from TFQA

Many TFQA programs provide both screen and "printed" output. Usually, you will want to send the "printed" output from the programs to a file. By default the output file extension for most programs is is .LST but for Windows an extension of .TXT works best. Then you can look at it using a text editor (like Windows Notepad or one of the substitutes, such as Notepad++ or Editpad Lite (both freeware) before you print it so that you can delete the pieces of output you don't want printed and then print the result from within the Windows application. You can also bring the output into a word processor such as Word or Word Perfect. However, in most word processors the default font is proportional. You will want to Edit>Select All and change the font for this document to a fixed font such as Courier.

Page Last Updated: 1 April 2020

Home Top Overview Ordering Documentation