visualbasicuser Posted July 18, 2003 Posted July 18, 2003 I am using Visual Basic .NET and I am trying to determine if a directory exists. All I want to do is print "Directory Exists" if it does exist and "Directory Doesn't Exist" if it doesn't. Can anyone help out? Thanks, Visualbasicuser Quote
Leaders dynamic_sysop Posted July 18, 2003 Leaders Posted July 18, 2003 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim dr As Directory If dr.Exists("C:\fakeDir") Then MessageBox.Show("it exsists!") Else MessageBox.Show("it doesn't exsist are you sure you put the correct directory name?") End If End Sub :) Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.