>>I think ADIR() allways sort by file name.
>
>No, it's usually in the same order as DOS DIR command returns by default. I would guess it's the order file names are stored in the drive directory.
I try now this sample code
#DEFINE CRLF CHR(13)+CHR(10)
lnFiles = ADIR( laArray, [c:\windows\*.*])
lcFile = []
FOR ijk = 1 TO lnFiles
m.lcFile = m.lcFile + laArray[m.ijk,1] + CRLF
NEXT
STRTOFILE(m.lcFile,[c:\test.txt])
MODIFY FILE c:\test.txt NOEDIT
and I'm surprised.
Seem as all is ordered by file name
_______________________________________________________________
Testing displays the presence, not the absence of bugs.
If a software application has to be designed, it has to be designed correctly!
_______________________________________________________________
Vladimir Zografski
Systems Analyst