|
-
December 11th, 2001, 06:51 AM
#4
Senior Member
An ASP solution
Ok, here's a solution in asp. Click here to see what my sample page looks like (note, the code is an exact copy, minus the folder location). Hope it works out for you, it's really easy to see it and all you have to do yourself is get them to log on to the page before they get to this! Good luck!
Code:
<%@ Language=VBScript %>
<% OPTION EXPLICIT %>
<html><body>
<font face="Verdana, Arial, Sans-serif">
<%
Dim objFSO
Dim objFolder
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
Set objFolder = objFSO.GetFolder(exactStrToFolder)
'The location of the folder you want to start at, ie "C:\Windows"
fileLoop objFolder, 0, ""
'**** Clean-up
Set objFolder = Nothing
Set objFSO = Nothing
%>
</font>
</body></html>
<%
Sub fileLoop( pobjFolder, pintDepth, pstrPath )
Dim objItem, I, strPath
Response.Write "[*]" & UCase( pobjFolder.name) & "<ul>"
For Each objItem In pobjFolder.Files
strPath = pstrPath & "\" & pobjFolder.name & "\" & objItem.name
Response.Write "[*]" & objItem.name & ""
'**** For-loop Clean-up
Set objItem = Nothing
Next 'objItem
For Each objItem In pobjFolder.SubFolders
fileLoop objItem, (pintDepth+1), (pstrPath & "\" & pobjFolder.name)
Next 'objItem
Response.Write "[/list]"
'**** Clean-up
Set pobjFolder = Nothing
Set I = Nothing
Set strPath = Nothing
End Sub
%>
- Stronzo
\"Vini, Vici, Vidi\"
I came, I saw, I conquered.
- Julius Caesar
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|