一聚教程网:一个值得你收藏的教程网站

热门教程

vithink小文件自动实现文件浏览下载

时间:2022-06-30 11:46:59 编辑:袖梨 来源:一聚教程网






 





<%
Set FSO = CreateObject("Scripting.FileSystemObject")

hu = Replace(Server.MapPath("index.asp"),"index.asp","") '本系统所在目录


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 & "

"
tmpStr = ""
Set Files = Folder.Files
tmpStr = tmpStr & ""
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