UNLINK

Portability Function: Deletes the file given by path.

Module: USE DFPORT

Syntax

result = UNLINK (name)

name
(Input) Character*(*). Path of the file to delete. The path can use forward (/) or backward (\) slashes as path separators and can contain drive letters.

Results:

The result is of type INTEGER(4). The result is zero if successful; otherwise, an error code. Errors can be one of the following:

Compatibility

CONSOLE STANDARD GRAPHICS QUICKWIN GRAPHICS WINDOWS DLL LIB

See Also: SYSTEM, DELDIRQQ

Example

 USE DFPORT
 INTEGER(4) ISTATUS
 CHARACTER*20 dirname
 READ *, dirname
 ISTATUS = UNLINK (dirname)
 IF (ISTATUS) then
    print *, 'Error ', ISTATUS
 END IF
 END