Skip to content

Instantly share code, notes, and snippets.

@keithbloom
Created October 30, 2011 07:10
Show Gist options
  • Save keithbloom/1325635 to your computer and use it in GitHub Desktop.
Save keithbloom/1325635 to your computer and use it in GitHub Desktop.
PreExecuteScriptErrors
WriteToFile "C:\Websites\PreExecute\Logs\PreExecuteErrors_" & Year(Now) & Month(Now) & Day(Now) & _
".html", " Date/Time: " & Now() & "<br />" & _
" ASP Code: " & objASPError.ASPCode & "<br />" & _
"ASP Description: " & objASPError.Description & "<br />" & _
" Category: " & objASPError.Category & "<br />" & _
" Column: " & objASPError.Column & "<br />" & _
" Description: " & objASPError.Description & "<br />" & _
" File: " & objASPError.File & "<br />" & _
" Line: " & objASPError.Line & "<br />" & _
" Number: " & objASPError.Number & "<br />" & _
" Source: " & objASPError.Source & "<br />" & _
"############################################################" & "<br />", True
<%
sDirectory = "/CMS/PreExecute/Logs/"
sPath = Server.MapPath(sDirectory)
Set fso = CreateObject("Scripting.FileSystemObject")
Set currentFolder = fso.GetFolder(sPath)
Set fileList = currentFolder.Files
%>
<html>
<head>
<title>RedDot : PreExecuteErrors</title>
</head>
<body>
<h1>List of files</h1>
<ul>
<% For Each file in fileList %>
<li><a href="<%= sDirectory & file.Name %>"><%= file.Name %></a></li>
<% Next %>
</ul>
</body>
</html>
<%
Set fileList = Nothing
Set currentFolder = Nothing
Set fso = Nothing
%>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment