Errica
09-19-2007, 04:27 PM
Actually, I found a different script. Any way for this to be modified so that it hides this file (which I've named index.asp??
<html>
<head><title>File List</title>
</head>
<body>
<ol>
<%
Set myFileSys = Server.CreateObject("Scripting.FileSystemObject")
Set Folder = myFileSys.GetFolder(Server.MapPath("/ais"))
for each file in Folder.Files
FileName = Left(file.name, (Len(file.name) - 4)) 'drop the extension
FileSize = cint(file.size / 1024) 'convert into kilobytes and drop the decimal
Response.Write("<li><a href='/" & file.name & "'>" & FileName & "</a> - " & FileSize & " K<br>" & chr(13))
next
Set myFileSys = nothing
%>
</ol>
</body>
</html>
<html>
<head><title>File List</title>
</head>
<body>
<ol>
<%
Set myFileSys = Server.CreateObject("Scripting.FileSystemObject")
Set Folder = myFileSys.GetFolder(Server.MapPath("/ais"))
for each file in Folder.Files
FileName = Left(file.name, (Len(file.name) - 4)) 'drop the extension
FileSize = cint(file.size / 1024) 'convert into kilobytes and drop the decimal
Response.Write("<li><a href='/" & file.name & "'>" & FileName & "</a> - " & FileSize & " K<br>" & chr(13))
next
Set myFileSys = nothing
%>
</ol>
</body>
</html>