C# 在本地创建文件夹及子文件夹
时间:2014-04-29 23:09:44
收藏:0
阅读:444
1 string dict = @"d:\估价报告\"; 2 if (!Directory.Exists(dict)) 3 { 4 Directory.CreateDirectory(dict); //创建文件夹 5 } 6 string subFolder = "subfolder"; 7 string pathString = System.IO.Path.Combine(dict, subFolder); 8 if (!System.IO.File.Exists(pathString)) 9 { 10 Directory.CreateDirectory(pathString); //创建子文件夹 11 }
评论(0)