http://www.thematrixmachine.dynu.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 %>
| ...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 %> |
© 2004 - Giovanni DI CECCA - http://www.dicecca.net