bas7advr.hlp (Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
KILL Statement Details
  Syntax  Details  Example                 Contents  Index  Back
──────────────────────────────────────────────────────────────────────────────
KILL deletes files from a disk.
 
KILL filespec$
    ■ The argument filespec$ is a string expression that may contain a
      path and the DOS wildcard characters question marks (?) or
      asterisks (*). A question mark matches any single character in the
      filename or extension. An asterisk matches one or more characters
      starting at its position.
 
Usage Notes
    ■ The KILL statement is similar to the DOS ERASE or DEL command.
    ■ KILL is used for all types of disk files: program files, random
      access data files, and sequential data files.
    ■ KILL deletes files only. To delete directories, use the DOS RMDIR
      command or the BASIC RMDIR statement.
    ■ Using KILL to delete a file that is currently open generates an error
      message that reads, "File already open."
 
Important
    ■ Be extremely careful when using wildcard characters with KILL.
      You can delete files unintentionally.