
530
|
Chapter 13: The ‘My’ Reference
This is the Title of the Book, eMatter Edition
Copyright © 2006 O’Reilly & Associates, Inc. All rights reserved.
Description
The DeleteFile method deletes the indicated file.
Usage at a Glance
• Visual Basic includes a Kill procedure that also deletes files.
• An exception is thrown if the path parameter is missing or invalid.
• An exception is thrown if the file does not exist or is in use.
• An exception is thrown if the user lacks sufficient file access permissions.
Example
The following example sends a file to the Recycle Bin.
My.Computer.FileSystem.DeleteFile( _
("C:\workfile.txt", OnlyErrorDialogs, SendToRecycleBin)
Related Framework Entries
• Microsoft.VisualBasic.FileIO.FileSystem.DeleteFile Method
• Microsoft.VisualBasic.MyServices.FileSystemProxy.DeleteFile Method
• System.IO.File.Delete Method
See Also
CopyDirectory Method, CopyFile Method, CreateDirectory Method, DeleteDirectory
Method, FileSystem Object, MoveDirectory Method, MoveFile Method, RenameDi-
rectory Method, RenameFile Method
Delimiters Property
Location
TextFieldParser.Delimiters
Syntax
Dim fileParser As FileIO.TextFieldParser
' ...later...
Dim result As String( ) = fileParser.Delimiters
or:
fileParser.Delimiters = setOfDelimiters
setOfDelimiters (required; String array)
An array of the character or multicharacter values that identify the delimiters used
to separate data fields in each input line of ...