没有合适的资源?快使用搜索试试~ 我知道了~
文件遍历排序函数
1 下载量 81 浏览量
2021-01-02
22:52:14
上传
评论
收藏 17KB PDF 举报
温馨提示
试读
2页
<% 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 fil
资源详情
资源评论
资源推荐
文件遍历排序函数文件遍历排序函数
<%
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
weixin_38564085
- 粉丝: 5
- 资源: 938
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论0