日期:2014-05-17 浏览次数:20855 次
DirectoryInfo srcDir = new DirectoryInfo(strSrc);
foreach (FileInfo fi in srcDir.GetFiles())
{
fi.FullName;
}
var fileName = Directory.GetFiles(@"C:\Users\guwei4037\Desktop\ckeditor").Select(x => Path.GetFileName(x)).ToList();
fileName.ForEach(x => Console.WriteLine(x));//循环输出指定目录的文件名