>So Cetin if I understand correctly I write the code just as I see it because they are built in Foxpro functions ? To make this simpler ny table is called California, and all the files I want to append are stored in C:\data. Is it possible you could write it one time using my table and my directory so I can see it in your code and understand it better. I am just past being a beginner in Foxpro programming.
>
>Thank you very much.
>
>
>Phil
OK Phil,
In command window type as is :
Modify command _AppendFiles
A code window will appear. There copy and paste :
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
Now press Ctrl+W to save (or click 'X' and answer yes to save)
From command window type as is :
clear all
use ?
Fox would popup a dialog box for you to choose a table. Locate and choose 'California.dbf'. As you choose cursor would retun to command window. Now exactly type as is :
_AppendFiles('c:\data\')
That's all.
Cetin