Deleting a file (#FILE DELETE)
The command #FILE DELETE is used to delete a file. The parameter must be specified. Otherwise, a corresponding error message is generated.
Syntax: |
#FILE DELETE [ PATH="<filename>" ] |
PATH= | File to be deleted with directory specification. |
The equals sign (=) is optional.
Notice

The user must have write authorisation to the PATH Directory to be able to delete a file.
Attention

WRITE PROTECTION:
If the file is write-protect5ed, the error is generated by ID 21627.
Attention

RELATIVE DIRECTORIES:
If the PATH parameter is specified as relative, a search is made for the file in the folders of the start-up/channel parameter list.
The search is for the sequence main program - subroutine - work directory.
Programing Example

Deleting a file
%FileDelete
N10 #FILE NAME[MSG="C:\Test.txt"] ;Create file
...
N40 #MSG SAVE["Write me into file"] ;Writes text to file
…
N60 #FILE DELETE[PATH="C:\Test.txt" ] ;Delete file
N70 M30