Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can I tell if a low level file is opened

Status
Not open for further replies.

LeonelSanchezJr

Programmer
Jan 26, 2001
522
US
I have a low level file that sometimes remains opened.
So, when I need to rename it, I get an error because it's already in use.

Is there something related to fopen and fclose which could tell me if the file is in use?
 
Before trying to rename it, just try another FOPEN(). Since this tries to open the file exclusive, the open will fail (gracefully) if you or someone else has it open.

Rick
 
Hi
If you want to close all files then simply issue
CLOSE ALL
This closes all FOPEN FCREATE files as well. ramani :-9
(Subramanian.G)
FoxAcc
ramani_g@yahoo.com
LET KNOW IF THIS HELPED. ENOUGH EXPERTS ARE HERE TO HELP YOU OUT! BEST OF LUCK :)
 
The problem is that I don't want to open all FOPEN CREATE files since some other program may have them open and I would close theirs.
 
CLOSE ALL will only close the files your program has open.

Rick
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top