Hi,
Afaik, I confirm there's a problem with DIRECTORY(), but it has to do with
the length of the path passed as 1st parameter; if that path is longer than
a given number of characters (not sure how many exact), then DIRECTORY()
returns an empty array; it is certainly a bug, because DOS itself supports
64 characters as path (plus additional drive letter and colon), with
additionally 12 characters for the file name (or wildcards; including the
extension dot)
I've found that making the path (that would be the 1st argument to
DIRECTORY()) the current DOS path, and querying with DIRECTORY() for a
pathless pattern, helps
f.i. instead of
DIRECTORY(
"c:\clipper5\sources\samples\myprogr\index\database\per_cat\dbf\initial\*.dbf"
)
use:
cPath := CURDIR()
DIRCHANGE(
"c:\clipper5\sources\samples\myprogr\index\database\per_cat\dbf\initial" )
// from CA-TOOLS
DIRECTORY( "*.dbf" ) // or DIRECTORY( ".\*.dbf" )
DIRCHANGE( cPath )
Personally, I switched to Klas Engwall's Long FileName library:
http://www.engwall.com/clipper/lfnlib.htm which has the LF_DIRECTORY()
function that works correctly (even if no support for LFN is available from
the OS)
CA-Clipper's DIRECTORY() (residing in EXTEND.LIB and being a .c source
program, but without the sources actually distributed) should be replaced; I
have tried to replace the 5.2e version with 5.3b's version but to no avail;
it should be replaced by a version that works correctly (within the DOS
specification of 64 characters in a path (at least))
hth,
Frank
<
boe...@gmail.com> schreef in bericht
news:2a0dc366-b2a6-4a52...@googlegroups.com...