private List<string> FindFile(string Path)
{
List<string> list=new List<string>();
DirectoryInfo di = new DirectoryInfo(@"C:\Users\Administrator\Desktop\File\");
FileInfo[] fis = di.GetFiles();
for (int i = 0; i < fis.Length; i++)
{
list.Add(fis[i].FullName);
}
return list;
}
//调用
List<string> pathList = new List<string>();
pathList = FindFile(@"C:\Users\Administrator\Desktop\File\");