string subPath ="ImagesPath"; // Your code goes here
bool exists = System.IO.Directory.Exists(Server.MapPath(subPath));
if(!exists)
System.IO.Directory.CreateDirectory(Server.MapPath(subPath));
string dir = @"C: est";
// If directory does not exist, create it
if (!Directory.Exists(dir))
{
Directory.CreateDirectory(dir);
}
string dir = @"C: est";
// If directory does not exist, create it
if (!Directory.Exists(dir))
{
Directory.CreateDirectory(dir);
}
// Directory class is in the System.IO namespace
Directory.CreateDirectory(dir);
string path1 = @"C: emp";
string path2 = Path.Combine(path1, "temp1");
// Create directory temp1 if it doesn't exist
Directory.CreateDirectory(path2);
Using System.IO;
//gets the directory where the program is launched from and adds the foldername
string path = Path.Combine(Environment.CurrentDirectory, "foldername");
//Creates a directory(folder) if it doesen't exist
Directory.CreateDirectory(path);