title: VBScript runtime error server map path not found
body: <p>I get the following error when I try to post a request from a form in my ASP application. </p>
  
  <p>Microsoft VBScript runtime error '800a004c'</p>
  
  <p>Path not found</p>
  
  <p>/build-your-own-report/stjreport/includes/includes.inc, line 16</p>
  
  <p>This is my includes.inc file</p>
  
  <p><strong>includes.inc</strong></p>
  
  <pre><code>&lt;%
      thisPage = Request.ServerVariables("SCRIPT_NAME")
      thisPage = Right(thisPageName,Len(thisPage) - InStrRev(thisPage,"/"))
  
      session.timeout = 5
      webDir = "/stjreport"
      pdf_path = server.MapPath("/") &amp; webDir &amp; "/pdfs"
      tmp_path = server.MapPath("/") &amp; webDir &amp; "/temp"
  
      Function RoundUp(n)
          roundUp = Int(n) - CBool(CDbl(n) &lt;&gt; CLng(n))
      End Function
  
      Sub cleanItUp(tt) 
          set incFS = server.createobject("scripting.FileSystemObject")
      /*line 16*/    set incFO = incFS.GetFolder(tmp_path)
          for each incF in incFO.files
              'if instr(1,incF.name,".pdf",1) &gt; 0 then
                  set tmpF = incFS.GetFile(incF)
                  if DateDiff("s",tmpF.DateCreated,now) &gt; tt then incFS.deleteFile(tmpF)
              'end if
          next
          set incFO = nothing
          set incFS = nothing
      End Sub
  
      Function makeRandomString(incLength)
          makeRandomString = ""
          seedStr = "1,N,O,P,Q,3,W,X,Y,Z,$,4,0,A,B,C,D,E,F,8,G,H,I,J,5,6,7,9,K,L,M,R,2,S,U,V,T,"
          rndAry = Split(seedStr,",")
          rndName = ""    
          For inc = 1 to incLength
              Randomize
              iRandom = Int( UBound( rndAry ) * Rnd )
              rndName = rndName &amp; rndAry( iRandom )
          next
          makeRandomString = rndName
      End Function    
  
      Sub displayMessage  (incMsg,incReturnUrl)
          if Len(incMsg) &gt; 0 then
              Response.write("&lt;br /&gt;&lt;br /&gt;&lt;p style='text-align:center; font-family:arial; font_size:larger;'&gt;" &amp; incMsg &amp; "&lt;/p&gt;")
  %&gt;
  &lt;script language="javascript"&gt;
              alert("&lt;%=Replace(Replace(incMsg,"&lt;br /&gt;","\n"),"&lt;br&gt;","\n")%&gt;");
  &lt;%
              if Len(incReturnUrl) &gt; 0 then
  %&gt;                      
                  top.location.href = "&lt;%=incReturnUrl%&gt;";
  &lt;%
              else
  %&gt;
                  top.history.go(-1);
  &lt;%
              end if
  %&gt;                                                  
  &lt;/script&gt;
  &lt;%
              Response.end()
          end if                      
      End Sub             
  
      Function isPermittedFile(incFileType,incFile)   
          incFile = replace(incFile, "\", "/")
          if inStr(incFile,"/") &gt; 0 then
              incAry = split(incFile,"/")
              incFile = incAry(uBound(incFile)-1)
          end if
          if inStr(incFile,".") = 0 then call (displayMessage("Image file: " &amp; incFile &amp; " sounds not to be a recognized image format",""))
          incFileAry = split(incFile,".")
          incExt = incFileAry(1)
  
          Select Case LCase(incFileType)
              Case "image"
                  incAllowedStr = ",gif,png,jpg,jpeg,bmp,tiff,"
              Case "document"
                  'incAllowedStr = ",pdf,doc,docx,txt,rtf,doc,docx,xls,xlsx,"
                  incAllowedStr = ",pdf,"
          End Select
          isPermittedFile = False
          if inStr(1,incAllowedStr,","&amp; LCase(incExt) &amp;",",1) &gt; 0 then isPermittedFile = True
      End Function
  
  %&gt;
  </code></pre>