evilradish
23 Jul 2010, 06:02 AM
I am trying to put together a page that monitors files on a home nas and if they exceed a certain size the colour of the cell changes red and if its below the colour is green.
High tech stuff :laugh:
So far I have managed to report the file size and location in a cell.. but am not sure how to write the colour change part.
Code Below
Thanks:)
<html>
<head>
<title>Home File Checker</title>
</head>
<body>
<body bgcolor="silver" text="black">
<table border="1">
<font="arial">
<tr>
<td>
<%
dim fs,f
set fs=Server.CreateObject("Scripting.FileSystemObject")
set f=fs.GetFile("\\NAS01\Music\Music.mdb")
Response.Write("Music")
Response.Write( f.Size & "bytes.")
set f=nothing
set fs=nothing
%>
</td>
</tr>
<tr>
<td>
<%
set fs=Server.CreateObject("Scripting.FileSystemObject")
set f=fs.GetFile("\\NAS01\Video\video.mdb")
Response.Write("video ")
Response.Write(f.Size & " bytes.")
set f=nothing
set fs=nothing
%>
</td>
</tr>
</body>
</html>
High tech stuff :laugh:
So far I have managed to report the file size and location in a cell.. but am not sure how to write the colour change part.
Code Below
Thanks:)
<html>
<head>
<title>Home File Checker</title>
</head>
<body>
<body bgcolor="silver" text="black">
<table border="1">
<font="arial">
<tr>
<td>
<%
dim fs,f
set fs=Server.CreateObject("Scripting.FileSystemObject")
set f=fs.GetFile("\\NAS01\Music\Music.mdb")
Response.Write("Music")
Response.Write( f.Size & "bytes.")
set f=nothing
set fs=nothing
%>
</td>
</tr>
<tr>
<td>
<%
set fs=Server.CreateObject("Scripting.FileSystemObject")
set f=fs.GetFile("\\NAS01\Video\video.mdb")
Response.Write("video ")
Response.Write(f.Size & " bytes.")
set f=nothing
set fs=nothing
%>
</td>
</tr>
</body>
</html>