> >I would like to know is there a way to append multiple text files that had
> delimiter by colons??
> >My main problem is that the files name are dynamic (change everytime)
> >any idea!!
>
> You could place any text files in a subdirectory of their own. Then use
> ADIR() function to return an array of filenames found in that
> subdirectory.
>
> lnCount = ADIR(laFiles, ".\TextDir\*.txt")
>
> lnCount will be the number files found
> laFiles is the array name
> laFiles(1,1) will be the first file name
> laFiles(2,1) will be the second file name, etc.
>
> You could then set up a loop --
>
> For i=1 to alen(laFiles,1)
> lcTxtFile = laFiles(i,1)
> append from (lcTxtFile) delimited with :
> EndFor
Using SYS(2000) may be more efficient:
m.lcFile = sys(2000,"TEXTDIR\*.TXT")
do while not empty(m.lcFile)
append from (m.lcFile) etc.
m.lcFile = sys(2000,"TEXTDIR\*.TXT",1)
enddo