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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only