Kill statement deletes files from disk.
The required File argument must be valid string expression representing a valid file name. Filemay contain a DOS path structure including directory or folder names, and a drive letter.
Kill supports the use of multiple-character (*) and single-character (?) wildcards to specify multiple files. The Kill statement does not work on a currently open file. To remove a directory use the RmDir statement.
The file system tracks the current drive and the current directory of every drive. Use the CurDir statement to determine the current directory. The current drive letter can be extracted from the Left character returned in the CurDir statement.
A string or expression that can represent a valid file name, and may include a DOS path structure including directory or folder names, and a drive letter.
Close | FileCopy | FreeFile | Name | Open
' Assume TESTFILE is a file containing some data.
' Delete all Dat files in current directory.