[会员中心]  [发布文章][发布软件]  [中文繁體]
 文章·资料  电脑软件  手机软件  网站源码
    本 站 搜 索
[选项]
   推 荐 文 章        More...
华硕易电脑(ASUS Eee PC 10..
先来段开场白:为了外出携带方便,..
Acronis True Image 使用..
  一款可以在Windows下使用全..
Norton Ghost 使用详解
一、分区备份   使用Ghost进..
    文 章 阅 读 排 行
Microsoft SQL Server 2000..
  对于第一次安装 Microsoft SQ..
ASP:Dimac W3 JMail 发送..
【发送邮件测试代码下载】压..
ASP:Persits ASPMail 发送..
【发送邮件测试代码下载】压..
VMware Workstation:安装..
编写这份虚拟机安装的图文教程,..
华硕易电脑(ASUS Eee PC 10..
先来段开场白:为了外出携带方便,..
ASP:Microsoft CDO 发送邮..
【发送邮件测试代码下载】压..
 文 章 信 息
ASP(FSO)文件列表排序
评论()〗〖留言〗〖收藏
〖文章分类:电脑·手机·网络 / 网站设计·开发·优化〗〖阅读选项
files_path=self_path.ParentFolder.ParentFolder
folderspec=files_path "\" dir_name
Set f = fso.GetFolder(folderspec)

Set fc = f.Files
For Each f1 in fc
response.write f1.name&"<br>"
next
---------------------------------------------------------------

<<%@LANGUAGE="VBSCRIPT'>%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<%
Function getFileInfo(filespec)'获取文件名和创建(修改)时间
Dim fs, f
dim s(1)
Set fs = CreateObject("Scripting.FileSystemObject")
Set f = fs.GetFile(filespec)
s(0) = "文件名" & f.Name & "<br>创建时间: " & f.DateCreated & "<br>"
s(1)=f.DateCreated
getFileInfo=s
End Function

Sub compositor(s0,s1)'冒泡排序
dim j,x
j=0
For i=0 to UBound(s1)
For j=0 to UBound(s1)-j
If Cint(Cdate(s1(i))-Cdate(s1(j)))>0 Then
x=s1(i)
s1(i)=s1(j)
s1(j)=x
x=s0(i)
s0(i)=s0(j)
s0(j)=x
End If
Next
Next
for i=0 to UBound(s0)
response.Write(s0(i))
next
End Sub

dir_name="abc"
Set fso = CreateObject("Scripting.FileSystemObject")
set self_path = fso.getfile(server.mappath(Request.ServerVariables("PATH_INFO")))
files_path=self_path.ParentFolder.ParentFolder
folderspec=files_path&"\" dir_name
Set f = fso.GetFolder(folderspec)

Set fc = f.Files
dim myFile(),fileCreateDate()
i=0
For Each f1 in fc
redim preserve myFile(i)
redim preserve fileCreateDate(i)
myFile(i)=getFileInfo(files_path&"\" dir_name&"\"&f1.name)(0)
fileCreateDate(i)=cdate(getFileInfo(files_path&"\" dir_name&"\"&f1.name)(1))
i=i 1
next
compositor myFile,fileCreateDate
%>

文章作者:未知  更新日期:2008-03-07
〖文章浏览:〗〖打印文章〗〖发送文章
·ASP(FSO)通过数组给文件列表排序2008-03-07
阅读说明
·本站大部分文章转载于网络,如有侵权请留言告知,本站即做删除处理。
·本站法律法规类文章转载自[中国政府网(www.org.cn)],相关法律法规如有修订,请浏览[中国政府网]网站。
·本站转载的文章,不为其有效性,实效性,安全性,可用性等做保证。
·如果有什么问题,或者意见建议,请联系[网站管理员]。
  当百网
  本站使用【啊估文章软件站】网站系统    网站管理员留言簿