I have a windows forms application and i need to check to see if a folder exists and if not then i need to create that folder, what is the sytax for this? anyone have any code samples?
I'm using vb.net 2005. thanks
In C#
using System.IO
Code Snippet if (!Directory.Exists(@"C:\JohnsFolder")) Directory.CreateDirectory(@"C:\JohnsFolder");
if (!Directory.Exists(@"C:\JohnsFolder"))
Directory.CreateDirectory(@"C:\JohnsFolder");
in VB.NET
Imports System.IO
If Not Directory.Exists("C:\JohnsFolder")
Directory.CreateDirectory("C:\JohnsFolder")
End If