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