very confused

Results 1 to 3 of 3

Thread: very confused

  1. #1
    Dinos P. Guest

    Default very confused

    HELP!<BR><BR>How can I get the last modified date for an html file in a directory two folders down from my main one? I have been able to get the last mod. date of a file in the root of my web server, but not say, "/mysite/home/home.htm" ...<BR><BR>Any ideas...???<BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: very confused

    Couldn&#039t you use the FileSystemObject and use the DateLastModified property???<BR><BR>HTH<BR><BR>Jerry

  3. #3
    Dinos P. Guest

    Default RE: very confused - I'm using fso.datelastmodi

    I am. Here is my code (imagine I&#039m passing in "/mysite/home/home.htm"):<BR> function get_lastmod (fileprops)<BR> filepath = server.mappath(fileprops)<BR> <BR> set fso = createobject("Scripting.FileSystemObject")<BR> set f = fso.getfile(filepath) <BR> <BR> response.write filepath<BR> if fso.fileexists(filepath) then<BR> response.write("we got into the if clause!")<BR> datelastmodified = f.DateLastModified <BR> else<BR> datelastmodified = "never!"<BR> end if<BR><BR> set f = nothing <BR> set fso = nothing<BR><BR> get_lastmod = datalastmodified<BR> end function<BR><BR>this is true: fso.fileexists(filepath) <BR><BR>but when it tries to process this: datelastmodified = f.DateLastModified <BR><BR>I get this: <BR>Server object error &#039ASP 0177 : 800a0035&#039 <BR><BR>Server.CreateObject Failed <BR><BR>/default.asp, line 44 <BR><BR>The operation completed successfully. <BR><BR>??? I&#039m so veyr confused because the code is correct, yet doesn&#039t work...<BR><BR>Thanks...

Posting Permissions

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