Kill Procedure


Kill Procedure

Class

Microsoft.VisualBasic.FileSystem

Syntax

     Kill(pathname) 


pathname (required; String)

The file or files to be deleted

Description

The Kill procedure deletes one or more files. The supplied pathname may include the * and ? wildcard characters in the filename component.

Usage at a Glance

  • pathname can be a relative or absolute path, either to a local or remote file.

  • If the file is open or is set to read-only, an error occurs.

  • The file or files are permanently deleted; they are not placed in the Recycle Bin. Visual Basic 2005 adds a new My.Computer.FileSystem.DeleteFile method that includes an option for the Recycle Bin.

  • Use the RmDir procedure to delete directories.

Version Differences

Visual Basic 2005 includes a My.Computer.FileSystem.DeleteFile method that provides similar functionality.

See Also

RmDir Procedure




Visual Basic 2005(c) In a Nutshell
Visual Basic 2005 in a Nutshell (In a Nutshell (OReilly))
ISBN: 059610152X
EAN: 2147483647
Year: 2004
Pages: 712

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net