Results 1 to 2 of 2

Thread: ASP vbs assistance

  1. #1
    Join Date
    Jun 2010
    Posts
    9

    ASP vbs assistance

    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

    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>

  2. #2
    Join Date
    Jun 2010
    Posts
    9
    heres my attempt at the colour change

    <%
    dim fs,f
    set fs=Server.CreateObject("Scripting.FileSystemObject")
    set f=fs.GetFile("\\ukaccounts\accounts\Revenue\Product Control\CFE - EIDB Business\Database\ITB Profit and Loss DB.mdb")
    Response.Write("\\ukaccounts\accounts\Revenue\Product Control\CFE - EIDB Business\Database\ITB Profit and Loss DB.mdb: ")
    Response.Write( f.Size & "bytes.")
    if
    (f.size >= 100)
    e.Row.BackColor = ColorRed;
    set f=nothing
    set fs=nothing


    %>

Similar Threads

  1. ASP Form & Javascript
    By Drone-7 in forum Client & Server Side Scripting (PHP, ASP, JavaScript)
    Replies: 0
    Last Post: 30 Apr 2008, 12:40 PM
  2. Dreamweaver connect to MSAccess via ASP
    By uzee in forum General Questions
    Replies: 0
    Last Post: 28 Apr 2007, 04:38 PM
  3. Passing data between two ASP pages
    By kris.c in forum Client & Server Side Scripting (PHP, ASP, JavaScript)
    Replies: 1
    Last Post: 22 Apr 2007, 11:05 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •