Show/Hide Toolbars


NoteThis command is defined in a header file and will be preprocessed by the X# preprocessor to a function call. If you disable the standard header (-nostddefs) files then this command will not be available. If you tell the compiler to use a different standard header file (-stddef ) then this command may also be not available


Remove a file from disk.


DELETE FILE | ERASE <xcSourceFile>


<xcSourceFile>The name of the file to delete, including an optional drive, directory, and extension.  SetDefault() and SetPath() do not affect this command.  It assumes the current Windows drive and directory if none is specified.  No default extension is supplied.
Warning!  Files must be closed before deleting them.


This example removes a specified file from disk then tests to see if the file was removed:


? File("temp.dbf")                // Result:  TRUE
DELETE FILE temp.dbf
? File("temp.dbf")                // Result:  FALSE



See Also

CurDir(), FErase(), File(), USE, SetDefault(), SetPath()