Kill Procedure VB.NET



pathname Use: Required Data Type: String

The file or files to be deleted

Deletes a file from disk

Rules at a Glance

  • If pathname does not include a drive letter, the folder and file are assumed to be on the current drive.
  • If pathname does not include a folder name, the file is assumed to be in the current folder.
  • You can use the multiple-character (*) and single-character (?) wildcards to specify multiple files to delete.
  • If the file is open or is set to read only, an error will be generated.

Programming Tips and Gotchas

  • Note that the deleted file is not placed in the Recycle Bin. However, the following code demonstrates how to use the FileOperation API found in Shell32.DLL to move a file to the Windows Recycle Bin:
  • Use the RmDir procedure to delete folders.

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd Protection Status

VB.NET Topics