* W2KBugTest.PRG #DEFINE hcCurrDir SYS(5) + CURDIR() MD _Test1 MD _Test2 CREATE TABLE _Test1\Test ; (cTest C(10)) INSERT INTO Test ; (cTest) ; VALUES ; ("Test 1") USE IN Test CREATE TABLE _Test2\Test ; (cTest C(10)) INSERT INTO Test ; (cTest) ; VALUES ; ("Test 2") CLOSE DATABASES ALL SET EXCLUSIVE OFF USE _Test1\Test * Try to copy _Test2\Test.dbf over top of _Test1\Test.dbf while the latter is open: * Following line should fail, because target file is in use: * Following line DOES fail with EXCLUSIVE OFF or ON, so is commented out here: *!* COPY FILE _Test2\Test.DBF TO _Test1\Test.DBF * Try the File System Object (presumably the same as what underlies Windows Explorer): loFSO = CREATEOBJECT("Scripting.FileSystemObject") loFSO.CopyFile(hcCurrDir + "_Test2\Test.dbf", hcCurrDir + "_Test1\Test.dbf") * Note that the preceding CopyFile call fails if SET EXCLUSIVE is ON =MESSAGEBOX("Test table _Test1\Test.DBF has been overwritten while open," + CHR(13) + ; "but its cTest value is still: " + Test.cTest, ; 0 + 64 + 0, ; "Step 1") USE IN Test USE _Test1\Test =MESSAGEBOX("Test table _Test1\Test.DBF has been closed, and re-opened." + CHR(13) + ; "Its cTest value is now: " + Test.cTest, ; 0 + 64 + 0, ; "Step 2") CLOSE DATABASES ALL ERASE _Test1\Test.DBF ERASE _Test2\Test.DBF RD _Test1 RD _Test2Test environment was VFP7 SP1 on Windows 2000 Professional SP3, no post-SP3 hotfixes. All test data written to a local hard drive (not a network drive).