Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
File functions
Message
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00166520
Message ID:
00167046
Views:
25
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
Previous
Reply
Map
View

Click here to load this message in the networking platform