All I'd add is that the new table will appear in your default folder unless you specify a path. You might find you've created a new table in C:\PROGRAM FILES\MICROSOFT VISUAL FOXPRO 9\ and that's not a good idea.
There's actually a VFP command that does what you want, much faster than SELECT on a large table:
COPY STRUCTURE TO (lcTempFileName)
You can write code to test if the source file is already open and open it if not, then make it the currently selected file and issue the COPY STRUCTURE. You can specify the full path in lcTempFileName. The cloned file is not opened afterwards, so you have to USE it.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.