title: how to make streamwriter create a url link in a non-system folder in C#
body: <p>I am having a problem with creating a url link (shortcut) in a non-system folder. The link is getting created properly on the desktop without any problem, but if I change the path to a non-system folder the folder remains empty and there is no error message either. Is there a restriction on the paths allowed? Why is there no error message?  Code is given below:</p>
  
  <pre><code>private void urlShortcutToFolder(string linkName, string linkUrl)
  {
      //string deskDir = Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory);
      //using (StreamWriter writer = new StreamWriter(deskDir + "\\" + linkName + ".url"))
      string nonSystemDir = "C\\Downloads";
      using (StreamWriter writer = new StreamWriter(nonSystemDir + "\\" + linkName + ".url"))
      {
          writer.WriteLine("[InternetShortcut]");
          writer.WriteLine("URL=" + linkUrl);
          writer.Flush();
      }
  }
  </code></pre>