>Dear Cetin Thank you, but how do I declare the variables for the directories and text files. I assume I must do that first ?
>
>Thanks.
>
>
>Phil
Phil,
Declarations for variables can be done but not necessary all the time.
lcDir = getdir()
Declares variable 'lcDir' and assigns value of getdir() result. You could say (and better do it that way) :
local lcDir
m.lcDir = getdir()
m.lcDir variable type is determined by the value assigned (here character as getdir() returns).
You could also say for your case (where path is already known) :
m.lcDir = 'c:\data\'
_AppendFiles(m.lcDir)
function _AppendFiles
lparameters tcPath
local lnFiles, ix
m.lnFiles = adir(aTextFiles, m.tcPath+'*.txt')
for m.ix = 1 to m.lnFiles
wait window nowait 'Appending : '+m.tcPath+aTextFiles[m.ix,1]
append from (m.tcPath+aTextFiles[m.ix,1]) delimited with character :
endfor
wait clear
Cetin