string strPath = @"C:WorkDocG"; DirectoryInfo Direct = new DirectoryInfo(strPath); foreach (FileInfo file in Direct.GetFiles()) { string Filename = file.Name; //文件名 string FullName = file.FullName; //文件路径 }