>Hi Naomi,
>
>>He-he, you never did :) Anyway, not a problem, I'll find it. Here, for example, Thread #
1029054>
>Actually, I did! :-) I just forgot to upload it here! :-)
>
>This code just create a new database in a new folder (C:\NEW_FOLDER) and then copy all records from an old folder (C:\OLD_FOLDER). To create a new database, I use GENDBC.PRG that you can find in VFP folder.
>
>I will copy code here, I think it will help you to create your own script.
>
>
>m.BDDC_Origem = "C:\OLD_FOLDER"
>m.BDDC_Destino = "C:\NEW_FOLDER"
>
>Open Database C:\NEW_FOLDER\YOURDATABASE.DBC
>AdbObjects(BDDC_Tabela, "Table")
>
>For m.BDDC_NoTabela = 1 To Alen(BDDC_Tabela,1)
> If File(m.BDDC_Origem+BDDC_Tabela[m.BDDC_NoTabela]+".DBF") .and. File(m.BDDC_Destino+BDDC_Tabela[m.BDDC_NoTabela]+".DBF")
> Wait Window NoWait "MOVING DATA: "+Alltrim(m.BDDC_Banco)+" - TABELA: "+BDDC_Tabela[m.BDDC_NoTabela]
> Use (m.BDDC_Origem+BDDC_Tabela[m.BDDC_NoTabela])
> Append From (m.BDDC_Destino+BDDC_Tabela[m.BDDC_NoTabela])
> EndIf
> Wait Clear
>EndFor
>
>
>I hope this help!
Except that it needs to turn off the RI, if any. And in case something goes wrong, and you have to repeat this, you may add zapping of the target tables so you wouldn't append the same records twice and you wouldn't need to recreate empty tables.