FT_DIR2DB()
Create .DBF of directory files, using DOS filespec
──────────────────────────────────────────────────────────────────────────────

Syntax

FT_DIR2DB( <cSpec> [, <cDbf> ][, <cNtx> ][, <cDrvr> ] ) -> <nErrcode>

Arguments

<cSpec> can be any valid DOS file spec., including wildcards and
single file names.

<cDbf> is the name of the .DBF to create. If not specified, the
name 'FILES' is used.

<cNtx> is the name of the .NTX to create. If not specified, no
index is created.

<cDrvr> is the name of the Nantucket RDD (replaceable database
driver) to use. If not specified, the default, 'DBFNTX', is
used.

Returns

<nErrcode>, which will be one of the following:

0 - no error
1 - no file spec. passed
2 - no files match spec. passed
3 - network error opening <cDbf>

Description

FT_DIR2DB() builds a .DBF from and fills it with the files/data
matching any valid DOS file spec. Fields created are 'Name',
'Size', 'Date', 'Time', and 'Attr' (attribute).

An index on the 'name' field is also created by passing a name
for the .NTX as a third parameter. An optional fourth parameter
accommodates the RDDs (replaceable database drivers) Nantucket
promises.

Examples

nVal:= FT_DIR2DB( "*.dbf","dbffiles","filename" )
Creates DBFFILES.DBF consisting of all .DBFs in the current dir-
ectory, and also creates FILENAME.NTX.

nVal:= FT_DIR2DB( "*.*","pdoxdbf","pdoxntx","paradox" )
would create a Paradox database and index consisting of all files
in the current directory.

Source: DIR2DBF.PRG

Author: Steve Kolterman