sfo获取文件夹列表

 

 

笔记收集

调用方法, <%=ShowFolderList(server.MapPath("manage_admin"))%> <% 'sfo获取文件列表,以下是函数 Function ShowFolderList(folderspec)  Dim fso, f, f1, fc, s  Set fso = Server.CreateObject("Scripting.FileSystemObject")  Set f = fso.GetFolder(folderspec)  Set fc = f.Files  s="文件编号"&"&nbsp;&nbsp;文件链接地址&nbsp;&nbsp;"&"文件名称<br>"  allpath="http://"&request.ServerVariables("HTTP_HOST")&"/"&split(request.ServerVariables("URL"),"/")(1)&"/"  counts=1  For Each f1 in fc   myname = f1.name   s = s &cint(counts)&"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"&allpath&myname&"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"&myname   s = s & " <BR>"   counts=counts+1  Next  ShowFolderList = s End Function %>

你可能感兴趣的:(F#)