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:
<%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>
Thanks in advance for your help.
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:
<%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>
Thanks in advance for your help.