title: Server.MapPath does not like ~/ and ./
body: <p>I am using the following code to try and find a file contained in another directory from my code file.</p>
  
  <pre><code>Set fi=fs.OpenTextFile(Server.MapPath("~/counter/counter.txt"), 1)
  </code></pre>
  
  <p>I have also tried.</p>
  
  <pre><code>Set fi=fs.OpenTextFile(Server.MapPath("./root/folder1/counter/counter.txt"), 1)
  </code></pre>
  
  <p>In either case this should get me back to the counter.txt file. From what I understand ~/ moves up 1 directory and ./ moves up to the root directory.</p>
  
  <p>Both times however I receive an error saying an invalid character has been used. When removing these I get a different error saying the path cannot be found (Which I would expect because it is not a valid path without moving up 1 directory).</p>
  
  <p>What are the valid characters to do the following in VBscript:
  move up a single directory?
  move up to the root directory?</p>
  
  <p>Thanks for the help</p>