Answers for "how to create directory folder in c#"

C#
0

how to create directory folder in c#

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));
Posted by: Guest on July-15-2021
0

file.create folder c#

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);
Posted by: Guest on April-11-2021

Code answers related to "how to create directory folder in c#"

C# Answers by Framework

Browse Popular Code Answers by Language