odd filesystem object

Results 1 to 2 of 2

Thread: odd filesystem object

  1. #1
    Dinos Papoulias Guest

    Default odd filesystem object

    Please help! <BR><BR>This code:<BR>-------------------------------------------------------<BR>&#060;%<BR> hpagename = "/mysite/home/home.htm"<BR><BR> filepath = server.mappath(hpagename)<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("<BR>we got into the if clause!<BR>")<BR> datelastmodified = f.DateLastModified <BR> else<BR> datelastmodified = "<BR>never!<BR>"<BR> end if<BR><BR> set f = nothing <BR> set fso = nothing<BR><BR> response.write("<BR>" & datelastmodified & "<BR>")<BR>%&#062;<BR>-------------------------------------------------------<BR><BR> returns this text in the browser:<BR><BR>-------------------------------------------------------<BR>d:<BR>we got into the if clause!<BR><BR>Microsoft VBScript runtime error &#039 800a0035&#039 <BR><BR>File not found <BR><BR>/ld.asp, line 12 <BR>-------------------------------------------------------<BR><BR>why does this happen? I have checked all the Microsoft references, etc...and the code seems to be correct yet I cannot get it to work..any help would be appreciated!<BR>Thank you,<BR>Dinos P.

  2. #2
    Dinos P. Guest

    Default RE: in other words

    in other words, if this code succeeds: fso.fileexists(filepath) <BR>why do I get a file not found?

Posting Permissions

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