Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
File functions
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Divers
Thread ID:
00166520
Message ID:
00167046
Vues:
22
1) We have a function EraseFile( directorypath, filename ), major code is:

if file( m.lcErasePath + m.lcFileToBeErased )
*
* A file exists, we can erase it, if it is not in use...
*
m.lcError = on( "Error" ) && 12/09/98 -- save error processing, only if we're trying to erase...
on error ;
=Ignoreit() && internally coded UDF
m.lnFile = fopen( m.lcErasePath + m.lcFileToBeErased, 2 )
if fclose( m.lnFile )
*
* 03/06/97 -- check for running on NT server...
*
ERASE &lcErasePath.&lcFileToBeErased
else
*
* Oops, file must be in use
*
m.llReturn = .F. && Failed
endif
on error &lcError && restore error processing...

2) You can use ADIR( arrayname, "D" ) && find sub-directories

Hope this helps
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform