C#判断是否有某文件夹存在

DirectoryInfo directory = new DirectoryInfo(@"D:001" + year + @"" + time.Substring(4,2) + @"" + LocaleId + @"");
if (!directory.Exists)//不存在
directory.Create();

原文地址:https://www.cnblogs.com/xwchengc/p/6343865.html