title: Documented behavior for multiple backslashes in Windows paths
body: <p>Apparently, Windows (or at least some part of Windows) ignores multiple backslashes in a path and treats them as a single backslash. For example, executing any of these commands from a command prompt or the Run window opens Notepad:</p>
  
  <pre><code>C:\Windows\System32\Notepad.exe
  C:\Windows\System32\\Notepad.exe
  C:\Windows\System32\\\Notepad.exe
  C:\Windows\System32\\\\Notepad.exe
  C:\\Windows\\System32\\Notepad.exe
  C:\\\Windows\\\System32\\\Notepad.exe
  </code></pre>
  
  <p>This can even work with arguments passed on the command line:</p>
  
  <pre><code>notepad "C:\Users\username\Desktop\\\\myfile.txt"
  </code></pre>
  
  <p><strong>Is this behavior documented anywhere?</strong> I tried several searches, and only found <a href="https://stackoverflow.com/questions/30177768/what-are-the-consequences-if-any-of-multiple-backslashes-in-windows-paths">this</a> SO question that even mentions the behavior.</p>
  
  <p>Note: I am not asking about UNC paths (\\servername), the \\?\ prefix, or the \\" double-quote escape.</p>
  
  <p>Note: I stumbled upon this behavior while working with a batch file. One line in the batch file looked something like this:</p>
  
  <pre><code>"%SOME_PATH%\myapp.exe"
  </code></pre>
  
  <p>After variable expansion, the command looked like:</p>
  
  <pre><code>"C:\Program Files\Vendor\MyApp\\myapp.exe"
  </code></pre>
  
  <p>To my surprise, the batch file executed as desired and did not fail with some kind of "path not found" error.</p>