Updated: 11/30/2021, 7:00:45 PM
Created: 11/30/2021, 7:00:45 PM
Last Updated By: Jake Tuttle
Read Time: 1 minute(s)

Tags: file handling

# Description

The OSDELETE command deletes a NT or UNIX file. It takes the general form:

OSDELETE filename [ON ERROR statements]


  • filename Specifies the file to delete. filename must include the file path. If the path is not specified, jBASE searches the current directory.
  • ON ERROR statements Specifies statements to execute if the OSDELETE statement fails with a fatal error because the file is not open, an I/O error occurs, or jBASE cannot find the file.

If the ON ERROR clause is not specified and a fatal error occurs, the program terminates.

After executing OSDELETE, the STATUS function returns either 0 or a failure code.

Code Description
0 The file was deleted
1 Delete failed.

An example of use is the program statement to delete the file ‘MYPIPE’ in the current directory:


Go back to jBASE BASIC

Go back to Programmers' Reference Guide