Para acceder a los archivos pulsa sobre VISUALIZAR ó DESCARGAR
Listado de archivos disponibles
|
|
<%
ruta = server.MapPath("\") + "\2014\infog\tramos\descargas\"
'nos crea el Objeto FSO
Set ObjetoFSO = Server.CreateObject("Scripting.FileSystemObject")
'nos selecciona la carpeta en la que esta el archivo
Set ObjetoCarpeta = ObjetoFSO.GetFolder(ruta)
'busca en todos los archivos que encuentra en dicha carpeta y nos devuelve el nombre
' Formats given size in bytes,KB,MB and GB
Function FormatSize(givenSize)
If (givenSize < 1024) Then
FormatSize = givenSize & " Bytes"
ElseIf (givenSize < 1024*1024) Then
FormatSize = FormatNumber(givenSize/1024,2) & " KiloBytes"
ElseIf (givenSize < 1024*1024*1024) Then
FormatSize = FormatNumber(givenSize/(1024*1024),2) & " MegaBytes"
Else
FormatSize = FormatNumber(givenSize/(1024*1024*1024),2) & " GigaBytes"
End If
End Function
%>
<% dim tr
tr = 1 %>
<% For Each Fichero in ObjetoCarpeta.Files %>
<% if tr = 1 then %>
<% tr = 2 %>
<% else %>
<% tr = 1
end if %>
| <%= Fichero.Name %> |
<%= Fichero.type %> |
<%= FormatSize(Fichero.Size) %> |
|
<% Next %>
<%
Set Fichero = Nothing
Set ObjetoCarpeta = Nothing
Set ObjetoFSO = Nothing
%>
|
|
|