title: How can I fix my path? System.IO.DirectoryNotFoundException: Could not find a part of the path
body: <p>Hey I want to write the data (ruck2) to a .txt file in my local folder.
  I have tried many paths but none of them worked. The last path I was trying is  "H:\Test/". How can I fix my path?</p>
  
  <pre><code>void Ableitung2()
          {
  
              delZ2 = output[output.Count - 1] - output[output.Count - 2]; // delta z
              delT2 = output_time[output_time.Count - 1] - output_time[output_time.Count - 2]; // delta t
              delT2 = delT2 * 1000; // aus millisekunden sekunden
              ruck2 = delZ2 / delT2; // hier wird die ableitung berechnet --&gt; Ruck
  
  
              var path = "H:/Test/";
              var filename = Path.Combine(path, "test.txt");
              using (var writer = new StreamWriter(filename))
              {
                  writer.WriteLine(ruck2);
              }
  </code></pre>
  
  <p>Unhandled Exception:</p>
  
  <p>System.IO.DirectoryNotFoundException: Could not find a part of the path "/H: \Test/test.txt".</p>
  
  <p>UPDATE</p>
  
  <p>Ok I found that the path of <code>var path = System.Environment.GetFolderPath(System.Environment.SpecialFolder.MyDocuments);</code> is /data/user/0/accelerometer2.accelerometer2/files </p>
  
  <p>When I searched for the folder on my Android I could not find it so I have created a new one and I have no Exceptions anymore!</p>
  
  <p>I wanted to create a txt file manually but it didnt worked so I guess thats why no file will be created.</p>