file exists?

Results 1 to 2 of 2

Thread: file exists?

  1. #1
    fl1rt Guest

    Default file exists?

    the following file is called fileexists.asp<BR>why doesn&#039t the file exist when executed?<BR><BR><BR><BR>&#060;%@ LANGUAGE="VBSCRIPT" %&#062;<BR>&#060;% Response.Buffer = "True" %&#062;<BR><BR>&#060;%<BR>dim filespec<BR>filespec = "fileexists.asp"<BR><BR><BR> Dim fso, msg<BR> Set fso = CreateObject("Scripting.FileSystemObject")<BR> If (fso.FileExists(filespec)) Then<BR> response.write filespec & " exists."<BR> Else<BR> response.write filespec & " doesn&#039t exist."<BR> End If<BR><BR>%&#062;

  2. #2
    Join Date
    Dec 1969

    Default RE: file exists?

    I assume that "fileexists.asp" is in the same folder<BR>Try :<BR>fso.FileExists(Server.MapPath(filespec)) <BR><BR>FSO likes the FULL path

Posting Permissions

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