title: Error: File Path is Too Long
body: <p>i am trying to use the various file functions in C# like <code>File.GetLastWriteTime</code>, copy command on the file placed at the path greater than maximum allowed path on windows 7 i.e 260. Its giving me an error on long path name. On MSDN support i they have asked to use the <code>\\?\</code> before the path. I did the same but still i got the same error, it seems it doesn't make any change. Below is my code. Please let me know if i am using it correct or i need to add any thing:<br/>
  These all lib i am using as the code is having other things also:</p>
  
  <p>the below is the respective code:</p>
  
  <pre><code>filesToBeCopied = Directory.GetFiles(path,"*",SearchOption.AllDirectories);
  for (int j = 0; j &lt; filesToBeCopied.Length; j++)
  {
      try
      {
          String filepath = @"\\?\" + filesToBeCopied[j];
          File.GetLastWriteTime(filepath);
      }
      catch (Exception ex)
      {
          MessageBox.Show("Error Inside the single file iteration for the path:" +
              filesToBeCopied[j] + " . The exception is :" + ex.Message);
      }
  }
  </code></pre>
  
  <p>where as path is the path to the folder at windows machine starting with drive letter. for ex.: <code>d:\abc\bcd\cd\cdc\dc\..........</code></p>