Wednesday, 14 March 2012 check a directory exits or not?

How to check a directory exits or not in
In this tutorial you can learn how to check a directory exits or not (to check whether the directory is there or not)using
First you have to import then
Directory.exits(dir path) As Boolean
Dir pathà where the directory path is and output is true or false
Ex:”c:\newtest “ if this directory exits then written true or else false
To do this event following steps should follow if you know ignore these steps
Drag and drop button1, label1, 2,textbox1
Label1àenter the path
Double click the button and copy and paste the following code
Imports System.IO

Public Class Form1

    Private SubButton1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) HandlesButton1.Click
        If Directory.Exists(TextBox1.Text) = True Then
            MessageBox.Show("Directory already created")
            MessageBox.Show("Directory  is not there")
        End If

    End Sub
End Class