KILL

Format

KILL string1

Description

This statement is used to delete a file from disk. It is similar to the DOS ERASE Statement. Specify the file to delete in string1. You can specify the full path to the file, or just the file name if it is in the current directory. If an error occurs (e.g., File not found), then ASIC will set the System ERROR variable. A list of codes returned by KILL is listed in the ERROR Messages Chapter of the ASIC Manual.

Example

KILL "TEMP.DAT"
IF ERROR = 0 THEN NOERROR:
REM CHECK ERROR CODES HERE
After this statement is executed, the file "TEMP.DAT" will have been erased from the current directory of the current drive, and will no longer be accessible from DOS or your programs.