Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to determine if a file or documents is in used?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Versions des environnements
Visual FoxPro:
VFP 7
OS:
Windows XP
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01034302
Message ID:
01034340
Vues:
20
>Is there an API call that determines if any certain file type is being in used?

You can use FOPEN.
lcFileName = GETFILE()
lnFH = FOPEN(lcFileName, 12)
IF lnFH > 0
=FCLOSE(lnFH)
* Ok to work with the file
ELSE
* The file is open somewhere exclusively
ENDIF


Thanks for the reply. These code works well if I have only one File. But my case, its four types of files, e.g. doc, xls, dat, filemaker data.. I had consult the help file and stumbled on the FOPEN API Routine but its not applicable to me..

I dont want to restart automatically the server with administrative logon enabled every day for security reasons, users dont have acces to file server, (But can read and wright to those files, funny , no pen drives allowed, no diskettes. Only thing is object access auditing is enabled at File Server.) files are sensitive and confidential... just to solve my backup problem.
Jojo R. dela Cuesta, B.Sc.
eConsultant, Programmer
Dalplus Technologies
http://www.dalplus.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform