Delfile

This function deletes a file.

It returns a status 0 on success or a negative code.

Notes:

Syntax

RETURN_VALUE=delFile(PATH)

Example

# Procedure that deletes a log fileSubprog DELETE_LOG_FILE(LOGFILE_NAME, ERR_CODE)Const Char LOGFILE_NAME()Variable Integer ERR_CODE# Delete the file# The file is supposed to be located in TMP directory on the application server with a tra extensionERR_CODE=delFile(filpath('TMP',LOGFILE_NAME,'tra'))End ERR_CODE

Return values

ValueExplanation
0Operation succeeded.
-20File does not exist.
-27Access denied.

See also

RenameFile