title: C# Get Full File Path
body: <p>I have an ASP FileUpload control and I am uploading:</p>
  
  <pre><code>C:\Documents and Settings\abpa\Desktop\TTPublisher\apache-tomcat-6.0.26\webapps\ttpub\WEB-INF\classes\org\gtfs\tmp\GTFS_Rail\routes.txt
  </code></pre>
  
  <p>What is the C# code to grab this entire string using the code below:</p>
  
  <pre><code>var pathOfCsvFile = Server.MapPath(ImportRoutes.FileName);
  var adapter = new GenericParsing.GenericParserAdapter(pathOfCsvFile);
  DataTable data = adapter.GetDataTable();
  </code></pre>
  
  <p>I know that Server.MapPath needs to change.</p>
  
  <p>UPDATE:</p>
  
  <p>Using <code>System.IO.Path.GetFullPath</code> gave me the below output:</p>
  
  <p><code>pathOfCsvFile = "C:\\Program Files\\Common Files\\Microsoft Shared\\DevServer\\10.0\\routes.txt"</code></p>