文章·资料 电脑软件 手机软件 网站源码




    本 站 搜 索
   推 荐 文 章        More...
华硕易电脑(ASUS Eee PC 10..
先来段开场白:为了外出携带方便..
Acronis True Image 使用..
  一款可以在Windows下使用..
Norton Ghost 使用详解
一、分区备份   使用Ghost..
    文 章 阅 读 排 行
世界各国所使用的国际域名..
域名缩写 国家/地区 ..
关于 Firefox 在中国持续..
亲爱的 Firefox 用户及 Firefox..
全国各地、公共 DNS 服务器
排序 地区/公司名称 ..
Microsoft SQL Server 2000..
  对于第一次安装 Microsoft ..
Windows 系统安装或备份时 ..
【ISO 文件】 ISO 文件其实..
Windows PE 系统安装微软..
如果电脑没有光驱,或者没有把..
ASP 网页编码 GB2312 转换..
1、用记事本打开文件(如果整站..
腾讯:难以承受之痛的背后..
亲爱的网吧管理员:   在此,..
SATA 硬盘分区设置与安装..
  随着i865、i875、KT600等..
Windows XP 安装界面修改..
安装装界面----也就是安装复制..
 文 章 信 息
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