udelete command

The udelete command removes the directory entry named by the path name.

Format

UDELETE <path> THEN statement(s) ELSE statement(s)

Parameters

path File expressed by the valid path name, within quotes.

Description

If no process has the file open, the file is deleted. If an error occurs, the ELSE path executes.

Example(s)

To remove the \library\book1.txt file:

FILENAME = “c:\library\book1.txt”
UDELETE FILENAME ELSE
   PRINT “Can’t delete ":FILENAME
END