var Path = @"";//文件夹路径
System.IO.DirectoryInfo dir = new DirectoryInfo(Path);
if (dir.Exists)
{
FileInfo[] fiList = dir.GetFiles();
}
追问哪个代表文件名??
追答foreach (var item in fiList)
{
var FilePath = item.FullName; //路径
var FileName = item.Name; //文件名加后缀
}
本回答被提问者和网友采纳