T Tips Aug 17, 2006 #3 In VB 2005 using My.Computer.FileSystem.CreateDirectory ("C:\MYDIR") In VB.NET Imports System Imports System.IO Dim di As DirectoryInfo = New DirectoryInfo("c:\MyDir") ' Determine whether the directory exists. If di.Exists Then ' Indicate that it already exists. msgbox("That path exists already.") Else ' Try to create the directory. di.Create() End If
In VB 2005 using My.Computer.FileSystem.CreateDirectory ("C:\MYDIR") In VB.NET Imports System Imports System.IO Dim di As DirectoryInfo = New DirectoryInfo("c:\MyDir") ' Determine whether the directory exists. If di.Exists Then ' Indicate that it already exists. msgbox("That path exists already.") Else ' Try to create the directory. di.Create() End If
C Cyril Gupta Aug 17, 2006 #4 Hello Tips, There's another method that removes the need of declaring a variable. System.IO.Directory.CreateDirectory("C:\MyDirectory") This single line will serve your purpose well. Regards Cyril Gupta You can do anything with a little bit of 'magination. I have been programming so long, that my brain is now soft-ware. http://www.cyrilgupta.com/blog
Hello Tips, There's another method that removes the need of declaring a variable. System.IO.Directory.CreateDirectory("C:\MyDirectory") This single line will serve your purpose well. Regards Cyril Gupta You can do anything with a little bit of 'magination. I have been programming so long, that my brain is now soft-ware. http://www.cyrilgupta.com/blog
T Tips Aug 17, 2006 #5 Hello Cyril, Thanks, But i'v declared the "di" variable just to determine whether the directory exists. Regards Elnahrawi
Hello Cyril, Thanks, But i'v declared the "di" variable just to determine whether the directory exists. Regards Elnahrawi