Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. articles. downloads. faq. members. files. rss.
 From: Yuri Rubinov
  Where is Yuri Rubinov?
 Philadelphia
 Pennsylvania - United States
 Yuri Rubinov
 To: Khurram Tahir
  Where is Khurram Tahir?
 Karachi
 Pakistan
 Khurram Tahir
Subject: RE: Check before copy or delete tables open
Thread ID: 185647 Message ID: 185648 # Views: 3 # Ratings: 1
Version: Visual FoxPro 9 Category: Projects and Design
Date: Thursday, July 24, 2008 3:17:54 PM         
   



> Q. Is there any way to check in a particular folder that tables are open or not open before copy or delete, if open then strict user that it is not possible to copy and delete tables because they are open
>
> e.g.
>
> (a) Copy File d:\xyz\*.dbf to d:\abc
>
> (b) Delete File d:\xyz\*.Cdx

One of the solutions:

lnfp=fopen(yourfile,2)
if lnfp >0
    fclose(lnfp)
else
   * file in use
endif


Best Wishes,

Yuri Rubinov

ENTIRE THREAD

Check before copy or delete tables open Posted by Khurram Tahir @ 7/24/2008 3:10:38 PM
RE: Check before copy or delete tables open Posted by Yuri Rubinov @ 7/24/2008 3:17:54 PM
RE: Check before copy or delete tables open Posted by Cetin Basoz @ 7/24/2008 3:25:31 PM