028-86922220

建站动态

根据您的个性需求进行定制 先人一步 抢占小程序红利时代

asp.net读取某个文件夹下所有的文件名

asp.net读取某个文件夹下所有的文件名(不包含子文件夹)
        System.IO.DirectoryInfo di = new System.IO.DirectoryInfo(@"C:\Documents and Settings\Administrator\My Documents\My Pictures");
        System.IO.FileInfo[] fimore = di.GetFiles();
        foreach (System.IO.FileInfo fi in fimore)
        {
            Response.Write(fi.Name);
            Response.Write("
");
        }
 
这个例子是读取我的文档下的图片收藏文件夹下的文件。

当前题目:asp.net读取某个文件夹下所有的文件名
链接地址:http://www.tsicrk.com/article/pesjje.html

其他资讯

让你的专属顾问为你服务

1.8911s