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.
|0||It deletes the file|
An example of use is the program statement to delete the file ‘MYPIPE’ in the current directory:
Go back to jBASE BASIC.