File.DeleteFile Method

Deletes a single file.

File.DeleteFile ( path )

Prerequisites

The file cannot be open for read or write.

Parameters

path

A String that contains the path to the file to delete, beginning with the device name and ending with the file name.

Remarks

This method deletes a single file in the location specified by the path parameter.

An error occurs if the file does not exist.

If any error occurs, this method throws an Exception.

Examples

File.DeleteFile("/ROMDISK/myfile.txt") ' Delete "myfile.txt"

See Also

File and Serial I/O | File.DeleteDirectory