EraseFile()


Deletes a file.

Syntax

EraseFile(<cFile>) --> lResult

Arguments

<cFile> --> is the name of the file to delete, including the file extension. A drive letter and/or path name should also be included as part of the filename.

Returns

Returns TRUE if the erase operation was successful, otherwise FALSE.

Description

EraseFile() is a file function that changes the name of a specified file to a new name. When EraseFile() is called, <cFile> is deleted only if it is located in the current operating system directory or in the specified path. To ensure that the file is successfully deleted, include the path as part of the file name.

Notes

If you wish to delete an index created with the IndexTable() function be sure to close the table first using the CloseTable() function.

generate/mistake3.gifYou should never erase a file that is already open!

Example

EraseFile("C:\CAPITAL\report.txt")

____________________________

Related Topics:

Business Function List

IsFile()



CAPITAL VISUAL BUILDER