FileDelete

Description

Deletes the named file.

Syntax

FileDelete ( filename )

Argument

Description

filename

A string whose value is the name of the file you want to delete


Return value

Boolean.

Returns true if it succeeds, false if an error occurs. If filename is null, FileDelete returns null.

Examples

These statements delete the file the user selected in the Open File window:

integer ret, value
string docname, named
 
value = GetFileOpenName("Select File," &
      docname, named, "DOC", &
         "Doc Files (*.DOC),*.DOC")
 
IF value = 1 THEN ret = MessageBox("Delete", &
      "Delete file?", Question!, OKCancel!)
IF ret = 1 THEN FileDelete(docname)

See also

FileExists