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=
<filename>“

File to be deleted with directory specification.

The equals sign (=) is optional.

Notice

notice

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

Attention

attention

WRITE PROTECTION:

If the file is write-protect5ed, the error is generated by ID 21627.

Attention

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

prg_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