
October 5th, 2005, 07:24 AM
|
|
Registered User
|
|
Join Date: Dec 2004
Posts: 28
Time spent in forums: 6 m 52 sec
Reputation Power: 0
|
|
|
Who can help me to find the bug in this script
I'm not a script-writer at all, but found this script on the net, that should do exactly what i was searching for:
What it does is showing the files inside a particular folder, as a link (or that's at least, that's what was said).
However, i can't seem to get it to work since i keep on receiving an "expected statement" error.
I hope somebody can help me with this.
This is the code:
Code:
<html>
<head>
<title>New Page 4</title>
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
</head>
<body>
<%Option Explicit Const IISFOLDER = "/Partitions/Joucomatic"%>
<%
Dim fso, folder, File, Files, sFileDetails
Set fso = Server.CreateObject("Scripting.FileSystemObject")
Set folder = fso.GetFolder(IISFOLDER)
Set Files = folder.Files
For Each File in Files
'--Only show files with constant file extensions
sFileDetails = "<b>File Name: " & File.name & "</b><br>" & _
"Date Created: " & File.DateCreated & "<br>" & _
"Date Date Last Accessed: " & File.DateLastAccessed & "<br>" & _
"Last Modified Date: " & File.DateLastModified & "<br>" & _
"Type: " & File.Type & "<br>" & _ "Path: " & File.Path & "<br>" & _ "Time From Creation: " & DateDiff("n",File.DateCreated,Now) & "minutes" & "<br>" & _
"Time From Modification: " & DateDiff("n",File.DateLastModified,Now) & " minutes" & "<br>" & _
"Time From Access: " & DateDiff("n",File.DateLastAccessed,Now) & " minutes" & "<hr>"
Response.Write sFileDetails
Next
Set folder = Nothing
Set fso = Nothing
%>
</body>
</html>
Any help is highly appriciated.
|