上一篇:FSO+递归生成文件列表(xml) >>
文件遍历排序函数
function bianli(path)
@#initiate
path = server.mappath(path)
set fso=server.CreateObject("scripting.filesystemobject")
set objFolder=fso.GetFolder(path)
set objfiles = objfolder.files
@#把文件名及文件路经存入theFiles数组
int slot = 0
Dim theFiles()
redim theFiles(50)
for each objFile in objFiles
filename = objFile.name
filePath = split(objFile.path,"docs\")
thepath1 = "./docs/"
thepath = thepath1 & filepath(1)
theFiles(slot) = filename&"**"&thepath
slot = slot + 1
if slot > UBound(theFiles) then
ReDim Preserve theFiles(Slot+20)
end if
next
ReDim Preserve theFiles(slot)
@#冒泡排序
for i = 0 to UBound(theFiles)-2
for j = i+1 to UBound(theFiles)-1
if strComp(theFiles(i),theFiles(j)) = 1 then
tmp = theFiles(i)
theFiles(i) = theFiles(j)
theFiles(j) = tmp
end if
next
next
@#输出
for i = 0 to UBound(theFiles)-1
para = theFiles(i)
filename = split(para,"**",-1,1)(0)
filepath = split(para,"**",-1,1)(1)
%>
<p align = "left">
---<img src=@#../../images/arrow_orange.gif@# width=@#14@# height=@#11@#>
<a href=@#<%=filepath%>@#><span class="activelink_yellow"><%=filename%></span></a>
</p>
<%
next
end function
%>
下一篇:利用FSO取得BMP,JPG,PNG,GIF文件信息 >>
相关文章:
- · 构建免受 FSO 威胁虚拟主机(一)
- · 类似于iis浏览的功能
- · 巧用FileSystem组件实现WEB应用中的本地特定打印
- · ASP中FSO对象对IIS WEB服务器数据安全的威胁及对策
- · 文件的读出 编辑 管理
- · 怎样判断一个盘上是否有文件
- · 用ASP实现对MP3曲目信息的操作
- · 关于用ADO STREAM做的无组件上传程序简单介绍
- · 从文本文件中读取信息并存储入数据库
- · 文本搜索
- · FileSystemObject处理文件
- · 设计 FileSystemObject
- · 处理驱动器和文件夹
- · 通过数组给您的文件排序
- · 用ASP做一个TOP COOL的站内搜索
- · 怎样读取一个文本文件的内容?
- · 在线用表单建立文件夹
- · filesystemobject组件的用法示例
- · ASP中文本文件与数据库文件的数据交换(FSO)
- · 列出指定目录下的所有文件和目录
- · 读取目录下的所有文件(包括子目录下的所有文件)
- · ASP中FSO的神奇功能 - FSO不能做到的
- · ASP中FSO的神奇功能 - 用FSO进行内容管理
- · ASP中FSO的神奇功能 - 使用FSO进行搜索
- · ASP中FSO的神奇功能 - 权限许可
- · ASP中FSO的神奇功能 - 文件读取
- · ASP中FSO的神奇功能 - 写文件
- · ASP中FSO的神奇功能 - 简介
- · 读取目录下的文件得到一个数组
- · 奇妙的文件系统对象组件
- · ASP.NET2.0导航功能之配置会员和角色
- · C#+ASP.NET开发基于Web的RSS阅读器
- · 在ASP.NET程序中实现语音合成
- · 在Apache上调试ASP.NET 1.1/2.0代码
- · ASP.NET初学:建立ASP.NET开发平台
- · 用ASP.Net和Access编写留言本
- · .net中发mail到hotmail中乱码问题的解决
- · ASP.Net应用程序的多进程模型
