Hi,
in case that a directory contains too many files (roundabout >12800) you can use SYS(2000, Skeleton [, 1]) to read it.
However, I can't remember if this is availlable in VFP8...
LOCAL lcCurDir as String, lcWinDir as String, lcFile as String
lcCurDir = FULLPATH(CURDIR())
lcWinDir = GETENV([windir])
CHDIR (lcWinDir)
lcFile = SYS(2000,[*.exe])
IF !EMPTY(lcFile)
CLEAR
?lcFile
DO WHILE .T.
lcFile = SYS(2000,[*.exe],1)
IF !EMPTY(lcFile)
?lcFile
ELSE
EXIT
ENDIF
ENDDO
ENDIF
CHDIR (lcCurDir)
RELEASE lcCurDir, lcWinDir, lcFile
>The code below works fine until lately. I think it may be too many frx files - there are now 13,597. I thought the array size limit was much larger.
>
>
>crea cursor txtpick (name c(50), size n(10), date d(8))
>
>mcnt = adir(ltxt,(*.frx))
>IF mcnt = 0
> =MESSAGEBOX('No matching files found',48,'Bad Luck')
> thisform.Release
> SELECT txtpick
> use
>ENDIF
>
>sele txtpick
>appe from array ltxt
>INDEX ON name tag name
>index on date tag date desc
Best Regards
-Tom
Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it.
Oh, and BTW: 010101100100011001010000011110000101001001101111011000110110101101110011