<٪
وظيفة bianli (المسار)
ابدأ
path = server.mappath (path)
set fso = server.createObject (scripting.filesystemObject)
تعيين objfolder = fso.getfolder (المسار)
تعيين objfiles = objfolder.files
'把文件名及文件路经存入 thefiles 数组
int slot = 0
Dim thefiles ()
redim thefiles (50)
لكل objfile في Objfiles
اسم الملف = objfile.name
FilePath = split (objfile.path ، docs/)
thepath1 = ./docs/
thepath = thepath1 & filepath (1)
thefiles (فتحة) = اسم الملف و ** & thepath
فتحة = فتحة + 1
إذا كانت فتحة> ubound (thefiles) ثم
Redim Present thefiles (Slot+20)
إنهاء إذا
التالي
Redim Preserve thefiles (Slot)
'冒泡排序
ل I = 0 إلى Ubound (thefiles) -2
لـ j = i+1 إلى Ubound (thefiles) -1
إذا كان strocmp (thefiles (i) ، thefiles (j)) = 1 ثم
TMP = thefiles (i)
thefiles (i) = thefiles (j)
thefiles (j) = tmp
إنهاء إذا
التالي
التالي
'输出
ل I = 0 إلى Ubound (thefiles) -1
الفقرة = thefiles (i)
اسم الملف = الانقسام (الفقرة ، ** ،-1،1) (0)
FilePath = split (الفقرة ، ** ،-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>
<٪
التالي
وظيفة نهاية
٪>