Help With File Exists

Results 1 to 3 of 3

Thread: Help With File Exists

  1. #1
    Andy Tabar Guest

    Default Help With File Exists

    Hi. What is wrong with the following snippet?<BR><BR>&#060;% <BR>Set fso = CreateObject("Scripting.FileSystemObject") <BR>If fso.FileExists(server.mappath("pages/" & PageName & ".asp")) Then <BR> body = (server.mappath("pages/" & PageName & ".asp"))<BR> Server.Execute(body)<BR>Else <BR> body = "error" <BR> Response.Write(body)<BR>End If <BR>%&#062;<BR><BR>There are probably some obvious mistakes but I am a newbie on this. I&#039;de appreciate any help. thanks!<BR><BR>Andy Tabar<BR><BR>

  2. #2
    brother love Guest

    Default RE: Help With File Exists

    what error are you getting?

  3. #3
    Join Date
    Dec 1969

    Default Server.CreateObject

    1. Set fso = *Server*.CreateObject("Scripting.FileSystemObject" ) <BR>2. Use backslash. ("pages\" & PageName & ".asp")

Posting Permissions

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