>Dragan,
>
>we must be running on different configurations, since I can, without any errors, do the following:
>
>create table myTable
>close tables all && need to avoid the error "file is open for proceed. Under normal procedures myTable would have been created already longtime be4 and would have been used in 0
>use myTable in 0
>copy struc extended to myTable.txt
>create table2 from myTable.txt
>Anyhow your system also works like a charm and I will use my lines till I will stumble over an error.
Are you sure your table has memo fields? Because that's what'll cause the error. To copy structure extended you're basically creating a new table - and starting with VFP3, that table has memos, because it has to support all the dbc-related stuff like default expressions, triggers, display classes etc, which all have to go somewhere. So if you give the TO table the same name as the original table, you're creating a .dbf (or whichever extension you give it - .txt works, but it's still a .dbf inside) AND a .fpt (can't choose here, it'll try to make a fpt whatever you do). Now if your original table was table.dbf, and it had a memo, it has a table.fpt and that is already open by you, because you just opened the table to copy its structure out.
Try this:
create cursor zz (i i)
copy structure extended to dbfexte.dummy
close databases all
use dbfexte.dummy
copy structure extended to dbfexte.bzy