Deletes files from a disk. The
feature gives you better productivity and performance in file I/O operations than My . For more information, see Kill . FileSystem
public static void Kill(
Parameters PathName Type: System .String
expression that specifies one or more file names to be deleted. String PathName can include the directory or folder, and the drive. supports the use of multiple-character ( Kill ) and single-character ( * ) wildcards to specify multiple files. ? Security Note In order to execute, the function requires Kill and Read flags of PathDiscovery to be granted to the executing code. For more information, see FileIOPermission , and SecurityException Code Access Permissions
This example uses the
function to delete a file from a disk. Kill
' Assume TESTFILE is a file containing some data.
Kill( "TestFile") ' Delete file.
' Delete all *.TXT files in current directory.
Supported in: 4.5.2, 4.5.1, 4.5, 4, 3.5, 3.0, 2.0, 1.1, 1.0
.NET Framework Client Profile
Supported in: 4, 3.5 SP1
Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.