title: Get current working directory
body: <p>How can I get the path to an actively running vbscript/classic ASP page? I have used several code snippets,  but all are giving the current working directory (C drive path) but I need to get current file path where the script is located.</p>
  
  <p>I am trying to display this in both a <code>.VBS</code> file and an <code>.ASP</code> file.</p>
  
  <pre><code>Dim folderName1
  folderName1 = ""
  
  Dim fso1
  Set fso1 = CreateObject("Scripting.FileSystemObject")
  
  Dim fullpath
  fullpath = fso1.GetAbsolutePathName(folderName1)
  
  response.write("folder spec: " &amp; folderName1)
  response.write( "fullpath:    " &amp; fullpath)
  </code></pre>
  
  <p>above code is giving C path.</p>