DELETEFILE Function

Deletes the specified file.

Category: External File
Returned data type: Integer
Note: The returned value is a Boolean value where 1= success and 0 = error.

Syntax

DELETEFILE(<filename>)

Required Argument

filename

a string representing the name of the file to be deleted; this can be specified as a fixed string, field name, or expression.

Details

The DELETEFILE function deletes a file from disk. If the file did not exist, then the return code will be set to false.

Example

string filename
boolean rc_ok
 
filename="C:\mydata_copy.txt"
 
rc_ok = deletefile(filename)