Function EmptyDate( dDate ) IF IsNull(dDate) Or Empty(dDate) return .T. Else return .f. Endif EndFunc ? EmptyDate({}} && Returns .T.This would belong better in a procedure file since it's own purpose is to return a single value from a single call.
oDel = CreateObject("FileDelete") oDel.Add("c:\tmp\*.tmp") oDel.Add("c:\tmp\*.txt") oDel.StartDelete() Define class FileDelete As Session Protected aFiles(1) FileCount = 0 Function Add( cFile ) If Type("cFile") = "C" This.FileCount = This.FileCount + 1 Dimension This.aFiles(This.FileCount) This.aFiles(This.FileCount) = cFile Endif EndFunc Function StartDelete() For i = 1 To This.FileCount *-- Delete the files or do whatever ? this.aFiles(i) + " Was Deleted" EndFor EndFunc Function Error( p1, p2, p3) *--trap errors here EndFunc Enddefine>I have a simple procedure which I have placed in a procedure library which, based upon a parameter passed, will delete all files from a directory with that filename and the various extensions (dbf, cdx, etc).