The udelete command removes the directory entry named by the path name.
UDELETE <path> THEN statement(s) ELSE statement(s)
|path||File expressed by the valid path name, within quotes.|
If no process has the file open, the file is deleted. If an error occurs, the ELSE path executes.
To remove the \library\book1.txt file:
FILENAME = “c:\library\book1.txt” UDELETE FILENAME ELSE PRINT “Can’t delete ":FILENAME END