DirectoryInfo dir = new DirectoryInfo(Path); foreach (DirectoryInfo df in dir.GetDirectories()) { if (df.ToString().Length != 18 ) { StreamWriter sw = new StreamWriter(@"Paht",true,Encoding.UTF8); sw.WriteLine(Path + ":" + df); sw. Close (); } DirectoryInfo fdir = new DirectoryInfo(Path + df + @"\"); // int i = 0 ; if (!Directory. Exists (fdir.ToString())) { StreamWriter sw = new StreamWriter(@"Path", true, Encoding.UTF8); sw.WriteLine(Path + ":" + df); sw. Close (); } foreach (FileInfo dChild in fdir.GetFiles(" * .swf")) { // i ++ ; } }
转载于:https://www.cnblogs.com/_fyz/archive/2010/11/04/1869279.html
相关资源:ASP实现遍历文件夹中图片文件,并按照时间顺序显示