How to Delete File using VB.Net

0
39

This tutorial is all about How to Delete File using VB.Net  With this tutorial about How to Delete File using VB.NetSo let’s get started:

  • This tutorial is a continuation of How to Copy a File using VB.Net
  • Add button from the toolbox.
  • Then add this code to the delete button.
    1. Dim a As String
    2. a = txtdestination.Text
    3. My.Computer.FileSystem.DeleteDirectory(a, FileIO.DeleteDirectoryOption.DeleteAllContents)
    4. MsgBox("Deleted file Succesfully")
  • Finally Click F5 to run Program.
    Output:

 

If you have any comments or suggestion about on How to Delete File using VB.Net , Please Feel Free to contact our webpage.

Download How to Delete File using VB.Net Code Here

Other articles you might read also:

Facebook Comments
(Visited 48 times, 1 visits today)

LEAVE A REPLY

Please enter your comment!
Please enter your name here