My question is how do i iterate the file names with 5 filenames on each page?
I have manage to retrieve and display the filenames with the codes below. Can anyone help me or give advice on how to do the iteration?
The codes are below and able to list filenames
Expand|Select|Wrap|Line Numbers
- <%@ Language=VBScript %>
- <HTML>
- <BODY>
- <%
- Dim objFileScripting, objFolder
- Dim filename, filecollection, strDirectoryPath, strUrlPath, newName
- strDirectoryPath="c:\inetpub\scripts\"
- strUrlPath="\scripts\"
- 'get file scripting object
- Set objFileScripting = CreateObject("Scripting.FileSystemObject")
- 'Return folder object
- Set objFolder = objFileScripting.GetFolder("C:\ASP collection\NYGH\Accolade")
- 'return file collection In folder
- Set filecollection = objFolder.Files
- 'create the links
- For Each filename In filecollection
- Filename=right(Filename,len(Filename)-InStrRev(Filename, "\"))
- x=len(Filename)
- newName = left(Filename ,x-4)
- Response.Write "<A HREF=""" & strUrlPath & filename & """>" & newName & "</A>
- "
- Next
- %>
- </BODY>
- </HTML>