home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Simtel MSDOS - Coast to Coast
/
simteldosarchivecoasttocoast.iso
/
pcmag
/
vol10n21.zip
/
DEL.PRG
< prev
next >
Wrap
Text File
|
1991-07-03
|
850b
|
21 lines
***********************************************************************
* DEL.PRG FoxPro 2.0
* Delete all files specified by a wildcard expression.
*
* Example: DO DEL WITH "c:\*.bak"
***********************************************************************
PROCEDURE DEL
PARAMETERS mWild
PRIVATE mPath, mFile
mWild = FULLPATH(mWild) && Construct full path
mPath = LEFT( mWild, RAT("\",mWild) ) && Extract path
mFile = SYS( 2000, mWild ) && Find first matching file.
DO WHILE ! EMPTY( mFile ) && Was a matching file found?
ERASE ( mPath+mFile ) && Yes, delete it.
mFile = SYS( 2000, mWild, 1) && Find next matching file.
ENDDO && Repeat process.
RETURN