Download
<meta http-equiv= "Content-type" content= "text/html; charset=gb2312 ">
<body>
<script src=http://www.mithink.com/js/top.js></script>
<table id= "Table16" cellspacing= "0" cellpadding= "0" width= "765" border= "0" >
<tr>
<TD valign= "Bottom" align= "Middle" colspan= "2" >
<table id= "Table21" cellspacing= "0" cellpadding= "0" width= "765" align= "center" border= "0" >
<tr>
<TD ><%
Set FSO = CreateObject ("Scripting.FileSystemObject")
Hu = Replace (Server.MapPath ("index.asp"), "index.asp", "") ' the Directory of the system
Set TestFolder = FSO. GetFolder (HU)
Generatetestinformation = Generateallfolderinformation (TestFolder)
Function generateallfolderinformation (Folder)
Dim S, subfolders, subfolder, Files, File, I
Tmpstr = ""
Set subfolders = Folder.subfolders
If subfolders.count <> 0 Then
i = 1
For each subfolder in subfolders
i = i + 1
Tmpstr = tmpstr & Generatefolderinformation (subfolder,i)
Next
End If
Response.Write Tmpstr & "</table><br>"
Tmpstr = ""
Set Files = Folder.files
TMPSTR = tmpstr & "<table border=0 width=100% cellspacing=1 cellpadding=4 align= ' left ' style= ' Word-break:break-al L ' > '
TMPSTR = tmpstr & ""
If not (Folder.isrootfolder) Then
TMPSTR = tmpstr & ""
End If
TMPSTR = tmpstr & ""
TMPSTR = tmpstr & ""
If files.count <> 0 Then
i = 1
For each File in Files
i = i + 1
Tmpstr = tmpstr & Generatefileinformation (file,i)
Next
End If
Response.Write Tmpstr & "</table>"
End Function
Function UrlEncode (Path)
UrlEncode = Replace (Server.URLEncode (Path), "\", "/")
End Function
Function Closefso
Fso. Close
Set FSO = Nothing
End Function
Function generatefileinformation (file,i)
Dim S, Rowcolor
Rowcolor = ""
If I Mod 2 = 0 Then rowcolor = "Bgcolor= #9999dd"
If I Mod 2 <> 0 Then rowcolor = "Bgcolor= #aaaaee"
S = "<TR><TD" &RowColor& ">" & file.name & "</td>"
s = S & "<TD" &RowColor& ">" & FormatNumber (file.size/1024, 0) & "kb</td>"
s = S & "<td align=center" &RowColor& ">"
s = S & "<a href= '" & File.name & ">↓</a></td></tr>"
Generatefileinformation = S
End Function
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' Function name: Generatefolderinformation ()
' Feature Description: Describes the current state of the folder
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Function generatefolderinformation (folder,i)
Dim S, Rowcolor
Rowcolor = ""
If I Mod 2 = 0 Then rowcolor = "Bgcolor= #dddddd"
S = ""
Generatefolderinformation = S
End Function
%>
</td>
</tr>
</table>
</td>
</tr>
</table>
<script src=http://www.mithink.com/js/bottom1.js></script>
</body>