http://www.dicecca.net
Cartella Web


<% Dim mypath, fso, folder, filez, FileCount mypath = "./" Set fso = CreateObject("Scripting.FileSystemObject") Set folder = fso.GetFolder(server.mappath(mypath)) FileCount = folder.Files.Count Function ShowImageForType(strName) Dim strTemp strTemp = strName If strTemp <> "dir" Then strTemp = LCase(Right(strTemp, Len(strTemp) - InStrRev(strTemp, ".", -1, 1))) End If Select Case strTemp Case "asp" strTemp = "asp" ' Se vuoi far succedere qualcosa di Case "htm" ' diverso a seconda che siano files strTemp = "htm" ' di una certa estensione, beh, allora Case "zip" ' devi modificare qui. strTemp = "zip" End Select strTemp = "" ShowImageForType = strTemp End Function %> <% Dim strPath Dim objFSO Dim objFolder Dim objItem strPath = mypath pathrelativo = split(Server.MapPath(mypath),"\") pathrel = pathrelativo(ubound(pathrelativo)) Set objFSO = Server.CreateObject("Scripting.FileSystemObject") Set objFolder = objFSO.GetFolder(Server.MapPath(strPath)) %> Files totali: <%= FileCount %>
Nella directory: <%= "/" & pathrel %>


<% For Each objItem In objFolder.SubFolders If InStr(1, objItem, "_vti", 1) = 0 Then %> <% End If Next 'objItem For Each objItem In objFolder.Files %> <% Next Set objItem = Nothing Set objFolder = Nothing Set objFSO = Nothing %>
...File name Dimensione Data di Creazione Tipo di file
<%= ShowImageForType("dir") %> " title="Vai nella cartella: <%= objItem.Name %>"> <%= objItem.Name %> <%= objItem.Size %> bytes   <%= objItem.DateCreated %> <%= objItem.Type %>
<%= ShowImageForType("images/" & objItem.Name) %> <%= objItem.Name %> <%= objItem.Size %> bytes   <%= objItem.DateCreated %> <%= objItem.Type %>
By Claudio Di Vicino ( Get his homepage! )