110,995
社区成员
发帖
与我相关
我的任务
分享
string path = "C:\\list";
foreach (string filename in Directory.GetFiles(path , "*.HTML"))
{
//this.listBoxEx2.Items.Add (Path.GetFileNameWithoutExtension(filename));
string s=Path.GetFileNameWithoutExtension(filename);
.........
}
string dir = @"D:\page";
DirectoryInfo Dir = new DirectoryInfo(dir);
foreach (FileInfo d in Dir.GetFiles())
Console.WriteLine(d.ToString());
string[] fileName=System.IO.Directory.GetFiles (Folder);
for(int j=0;j<fileName.Length;j++)
{
string fileFolder=fileName[j].Trim();
string docName=fileFolder.Substring(fileFolder.LastIndexOf(@"\")+1);//文件名
}