Deletes files from a disk.
Public Sub Kill(ByVal PathName As String)
| Exception type | Error number | Condition |
|---|---|---|
| 55 | Target file(s) open. | |
| 53 | Target file(s) not found. |
Kill supports the use of multiple-character (*) and single-character (?) wildcards to specify multiple files.
This example uses the Kill function to delete a file from a disk.
' Assume TESTFILE is a file containing some data.
Kill("TestFile") ' Delete file.
' Delete all *.TXT files in current directory.
Kill("*.TXT")
RmDir Function |