string path = @"C:\Windows";
string[] files = System.IO.Directory.GetFiles(path); //获取所有文件名
string[] dirs = System.IO.Directory.GetDirectories(path); //获取所有目录名
ArrayList GetAll(DirectoryInfo dir)//搜索文件夹中的文件 { ArrayList FileList = new ArrayList(); FileInfo[] allFile = dir.GetFiles(); foreach (FileInfo fi in allFile) { FileList.Add(fi.Name); } DirectoryInfo[] allDir= dir.GetDir...