¿Alguien dispone de un código de páginación [10 en 10] para el siguiente FileSystemObject?
Gracias,
Emajesus
<%@ Language=VBScript %>
<html>
<head>
</HEAD>
<BODY>
<%
dim strPathInfo, strPhysicalPath
strPathInfo = Request.ServerVariables("PATH_INFO")
strPhysicalPath = Server.MapPath(strPathInfo)
Dim objFSO, objFile, objFileItem, objFolder, objFolderContents
Set objFSO = createObject("scripting.FileSystemObject")
Set objFile = objFSO.GetFile(strPhysicalPath)
Set objFolder = objFile.ParentFolder
Set objFolderContents = objFolder.Files
%>
<div align="center">
<center>
<table cellpadding=5 style="border-collapse: collapse" bordercolor="#111111" cellspacing="0" border="1">
<tr align=center><th align=left><font face="Verdana" size="2">File Name</font></th><th>
<font face="Verdana" size="2">Type</font></th><th>
<font face="Verdana" size="2">File Size</font></th><th>
<font face="Verdana" size="2">Last Modified</font></th></tr>
<%
For each objFileItem in objFolderContents
%>
<tr><td align=left>
<font face="verdana" size="2" color="darkgreen">
<a href="<%= objFileItem.Name %>"><%= objFileItem.Name %></a></font> </td>
<td align=right><font face="verdana" size="2" color="darkgreen"><%= objFileItem.Type %></font> </td>
<td align=right><font face="verdana" size="2" color="darkgreen"><%= objFileItem.Size %></font> </td>
<td align=right><font face="verdana" size="2" color="darkgreen"><%= objFileItem.DateLastModified %></font> </td>
</tr>
<%
Next
%>
</TABLE>
</center>
</div>
</BODY>
</HTML>
Al menos decidme si es posible ;)
Un saludo,
Emajesus


<html>
<head>
<title>Spoof Ads</title>
</head>
<body>
<%
strPhysicalPath = "/spoofs/" ' Mappen med filerne
Set objFS = CreateObject("Scripting.FileSystemObject")
Set objFolder = objFS.GetFolder(Server.MapPath(strPhysicalPath))
Set objFiles = objFolder.Files
intPage = Request.Querystring("page")
If isNumeric(intPage) = False Or intPage < 1 Then
intPage = 1
End If
intPageSize = 10 ' Antal filer på hver side
intImgCount = objFiles.Count
intPageCount = -Int(-(objFiles.Count/intPageSize))
Response.Write "<p><strong>" & objFiles.Count & " Imágenes - "
Response.Write "página " & intPage & " de " & intPageCount & ":</strong></p>"
For Each objFileItem In objFiles
intFile = intFile +1
If (intFile >= ((intPage-1)*intPageSize)+1) And (intFile =< (intPageSize*intPage)) Then
Response.Write "<p><a href='" & strPhysicalPath & objFileItem.Name & "'>" & strPhysicalPath &
objFileItem.Name & "</a></p>"
End If
Next
strScriptName = Request.Servervariables("ScriptName")
Response.Write "<p>Páginas: "
For i = 1 To intPageCount
Response.Write "<a href=" & strScriptName & "?page=" & i & ">" & i & "</a> "
Next
Response.Write "</p>"
Set objFS = Nothing
%>
</body>
</html>