delfile 

delfile is used to delete a 'physical' file given as an argument.

Syntax

delfile( path_fic)

Setups

Element

Description

Restrictions

path_fic

Expression of Char type corresponding to the path of the file to delete

None

Examples

# Deletion of the fic file
Local Integer I
I = delfile('/home/FIC')

Description

The function delfileis used to delete a file.

delfile returns an integer that gives the result of the operation. If the result is different from 0, the deletion operation has failed.

NB:

The type of returned result is Integer.

On Windows, the file can be written with '/' or '\' indifferently.

If the file does not exist or is not accessible, the function delfile returns the corresponding error number (with a negative sign), without generating any error in the processing. In principle, the errors returned will be in the following list:

Error

Description

PAFIC (20)

The file is non-existent

ERACCE (27)

access error (i.e. the directory is not accessible in principle

Associated keywords

RENAMEFILE