.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Home >> Code Snippets >> Visual Studio >> Post New Resource Bookmark and Share   

 Subscribe to Code Snippets

Delete non-empty folder in vb.net

Posted By:laptop charles       Posted Date: January 01, 2011    Points: 15    Category: Visual Studio    URL: http://www.dotnetspark.com  

It is used to delete non-empty folder.it contain one button and click the button folder will delete.The folder will not found display the message "File not found".

Imports System.IO

Public Class Form1

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim ch As New DirectoryInfo("C:\charles")
        If ch.Exists() = True Then
            MsgBox("The folder is deleted")
            MsgBox("The folder is not found")
        End If

    End Sub
End Class


Further Readings:


No response found. Be the first to respond this post

Post Comment

You must Sign In To post reply
Find More code samples in C#, ASP.Net, Vb.Net and more Here

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend