using System.IO; namespace ConsoleApp15 { class Program { static void Main(string[] args) { CreateDirectory(@"D:\001"); } /// <summary> /// 创建文件夹 /// </summary> /// <param name="path">路径</param> static void CreateDirectory(string path) { if (!Directory.Exists(path)) { Directory.CreateDirectory(path); } } } }