<%
função bianli (caminho)
'iniciar
caminho = server.mappath (caminho)
set fso = server.createObject (script.filesystemoBject)
set objFolder = fso.getFolder (caminho)
Definir objfiles = ObjFolder.Files
'把文件名及文件路经存入 Os arquivos 数组
int slot = 0
Dim thefiles ()
Redim Thefiles (50)
Para cada objfile em objfiles
nome do arquivo = objfile.name
filepath = split (objfile.path, docs/)
thePath1 = ./docs/
ThePath = ThePath1 & FilePath (1)
thefiles (slot) = nome do arquivo & ** & thePath
slot = slot + 1
se slot> ubound (thefiles) então
Redim Preserve The Filfiles (slot+20)
final se
próximo
Redim Preserve The Filfiles (slot)
'冒泡排序
para i = 0 a ubound (thefiles) -2
para j = i+1 a ubound (thefiles) -1
Se strComp (thefiles (i), thefiles (j)) = 1 então
tmp = thefiles (i)
thefiles (i) = thefiles (j)
thefiles (j) = tmp
final se
próximo
próximo
'输出
para i = 0 a ubound (thefiles) -1
para = os arquivos (i)
nome do arquivo = split (parágrafo, **,-1,1) (0)
filepath = split (parágrafo, **,-1,1) (1)
%>
<p alinhado = esquerda>
--- <img src = '../../imagens/arrow_orange.gif' width = '14 'altura = '11'>
<a href = '<%= filepath%>'> <span class = ActivElink_yellow> <%= FILENAME%> </span> </a>
</p>
<%
próximo
Função final
%>