This archive includes the following files:

     dbftools.exe  - the dbf toolkit program, 85399 bytes
     dbftools.c  - the source code, 5248 bytes
     readme   - you're reading it, aren't you? 

All  three are dated 1-28-90;  the dbftools files were created at 
2:50 AM and this file sometime thereafter. If any of the sizes or 
dates appear different,  DON'T TRY TO USE THEM!  Better safe than 
screwed....

     DBFTOOLS.EXE   is  a  nifty  little  stand-alone  .DBF  file 
utility.  Rather than start up your Clipper application (or worse 
yet DBU) just to zap,  pack or index the records from a database, 
you  can  run  this little feller.  I got tired  of  waiting  for 
DBU.EXE to load and then schlepping through all of the menus just 
to clear out a temporary file.  So I started looking around for a 
faster alternative. 

     I decided not to do it in Clipper, since the minimum size of 
a clipper program is about 150K.  So I went out and picked up the 
Code   Base  4  library.   I'm  moderately  impressed  with   the 
functionality,  but  not  real  pleased  with  the  size  of  the 
executable file.  Also,  it doesn't seem to want to clean out the 
associated .DBT file.  But it's an improvement over what I've got 
right now, and I've only got maybe an hour and a half invested in 
it so far. We'll see....

     There are three functions supported:  ZAP,  PACK, and INDEX. 
To use the program, just use one of the following formats:


***                      "dbftools zap myfile"     

     This zaps the database myfile.dbf,  which basically means it 
alters  the file header to look like there aren't any records  in 
the  file.  THIS IS UNRECOVERABLE WITHOUT SOME REALLY SPECIALIZED 
SOFTWARE! You have been warned....


***                      "dbftools pack myfile"

     This packs the database myfile.dbf,  which means any records 
marked  for  deletion are physically removed from  the  database. 
THIS WILL MAKE THESE RECORDS UNRECOVERABLE!  BE SURE YOU  REALLY, 
TRULY DON'T WANT ANY OF THEM BEFORE YOU DO THIS!


***            "dbftools index myfile expression indexfile"

     This  indexes database myfile.dbf on expression "expression" 
to index file "indexfile.ntx". This is the Clipper format, and is 
not  compatible  with DBase  or  Foxbase.  NOTE:  ANY  PREVIOUSLY 
EXISTING FILE BY THE SAME NAME WILL BE DELETED!  BE SURE YOU WANT 
TO DO THIS!

     If  you don't give the correct parameters,  it will  display 
the correct syntax and then exit.  If you specify a .DBF file  it 
can't find it will let you know that,  too.  In either event, the 
DOS errorlevel will be set to 1 at exit.

     Once  you have specified a .DBF file,  it tells you how many 
records  are  in  it  now,   and  asks  if  you  REALLY  want  to 
zap/pack/index it.  If you hit 'y' and then ENTER, it will REALLY 
zap/pack/index  your file,  and then let you know it is finished. 
The DOS errorlevel will then be set to 0.

     Easy,  right?  Well,  you  can of course use dbftools.exe to 
build batch files for your favorite chores. If you want to put it 
in  a  batch file without the need  for  operator  response,  try 
something like this:


SAMPLE.BAT
echo off
echo y | dbftools pack filename
if errorlevel 1 echo Hey, sport! Filename didn't get packed!
:end


     Or  you might want a general-purpose .DBF file  zapper.  Try 
this  one,  it allows you to specify however many files you  need 
right on the command line!

ZAP.BAT
echo off
rem zaps .DBF files listed on the command line
if not %1& == & goto begin
echo Syntax:  ZAP  filename  [filename  filename ...]
goto end
:begin
dbftools zap %1
if errorlevel 1 pause
shift
if not %1& == & goto begin
:end



     I  have  included the source code for  dbftools,  because  I 
believe everyone downloading these days has a right to be worried 
about viruses.  I haven't done anything to trash your system, but 
you have absolutely no reason to believe me.  So as partial proof 
of intent, I'm letting you check the code for yourself.

     Be  REAL  careful  with this puppy!  It's  as  dangerous  as 
gravity in the Grand Canyon.  If you aren't sure you want to  get 
rid of the data in your database, leave it alone.

     I am releasing this to the world as "freeware",  meaning I'm 
not going to ask for a licensing fee,  donation, or even a "Thank 
You!"  I am,  however,  keeping the copyright,  since there's  no 
telling what happens to abandoned software. If I still "own" it I 
can conceivably add to it at a later date. 

     You are authorized to use this program for manipulating YOUR 
OWN data, on YOUR OWN machine, for as long as you want, Amen. But 
if  you accidentally wipe out the wrong stuff,  I'm not to blame, 
YOU ARE!  I will accept no responsibility for lost profits, time, 
sleep,  or sanity since I'm not getting anything from you.  I'm a 
nice guy, but I don't make enough money to cover your losses. 

     You are also authorized to pass this program around, post it 
on bulletin boards,  whatever,  as long as all three files listed 
above are included in the package.  You most specifically are NOT 
authorized  to  sell it,  or charge a fee of more than $5.00  for 
reproducing it for distribution. 

     Clipper,  Code  Base 4,  Turbo C,  Foxbase,  and  DBase  are 
trademarks  of their respective companies.  dbftools was compiled 
and linked with Turbo C 2.00 and runs quite well on "Lucille", my 
home-brew XT clone.  I suspect it will run even faster on  faster 
machines, but if it doesn't, drop me a line.

               Dave Gordon
               5580 Hollins Lane
               Burke, VA 22015

P.S.   I  CAN  create a version of this for DBase III Plus  index 
files, if anyone is interested. If you are, let me know and we'll 
work something out.