DirectoryInfo directory = new DirectoryInfo(@"D:\0001\" + year + @"\" + time.Substring(4,2) + @"\" + LocaleId + @"\");
if (!directory.Exists)//不存在
directory.Create();
原文:http://www.cnblogs.com/xwchengc/p/6343865.html