Close Databases All Local LcFrom,Lcto,OldPath LcOldPath = Sys(5)+Curdir() LcFrom = "c:\soykan\mysoftware\emin_elk\data03\" &&thisform.txtFrom.value Lcto = "c:\soykan\mysoftware\emin_elk\testDb\" &&thisform.txtTo.value Set Path To Data &&audit tables and params folder &&must set path for log update Open Database (m.LcFrom)+ 'Data1.dbc' Do Home() + 'tools\gendbc\gendbc.prg' With (m.Lcto) + 'Make_Empty_DB.prg' Close All Cd (m.Lcto) Do Make_Empty_DB.prg Close All Cd (m.LcOldPath) Wait Window "DataBase and Tables Has Been Created..." Nowait Local LcOldDir,LcNewDir,LcTable LcOldDir = m.LcFrom &&ADDBS("...") LcNewDir = m.Lcto &&ADDBS("...") For i=1 To Adir(laTableList, m.LcNewDir + "*.dbf") LcTable = laTableList[i,1] Wait Window " Old " + m.LcTable +" Records Transferring To The New " + m.LcTable Nowait Use (m.LcNewDir + m.LcTable) Exclusive Append From (m.LcOldDir + m.LcTable) Use Endfor Wait Window "Old Records Has Been Moved To New DataSet..." Nowait Close All