Function Deletefile (Byval SfileName As String) AS Integer On Error Resume Next Deletefile = false if isfile (sfilename) Then Kill sfilename deletefile = not isfile (sfilename) End Function
example
If deletefile ("c: /temp/myfile.doc") The msgbox "The file 'c: /temp/myfile.doc HAS been deleded."