uso lo script qui sotto per leggere il contenuto di una cartella e mi mostra le sottocartelle in ordine alfabetico:
aaa
bbb
ccc
č possibile far visualizzare al contrario:
ccc
bbb
aaa
???
lo script che uso č questo:
<%
ShowSub = request("ShowSub")
ShowPic = request("ShowPic")
strPathInfo = Request.ServerVariables("PATH_INFO")
strPhysicalPath = Server.MapPath(strPathInfo)
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.GetFile(strPhysicalPath)
Set objFolder = objFile.ParentFolder
Set objFolderContents = objFolder.Files
For each Folder in objFolder.SubFolders
If Left(Folder.Name,1)<>"_" Then
CurFile = Replace(CurFile, "'", "'")
if ShowSub = Folder.Name Then Response.Write ">"
Response.write "<a href='" & CurFile & "?ShowSub="
'Response.Write"value='" & CurFile & "?ShowSub="
Response.Write(Replace(Folder.Name, " ", "%20"))
response.write "'>"
Response.Write(Folder.Name & "</a>
")
If ShowSub <= " " Then
ShowSub = Folder.Name
End if
End if
Next
Set objFSO = Nothing
%>