title: What does "2>&1" in a Windows Command Do?
body: <p>Doing some maintenance on a script, I found this line:</p>
  
  <pre><code>ping -n 40 127.0.0.1 &gt; NUL 2&gt;&amp;1
  </code></pre>
  
  <p>I know <a href="https://stackoverflow.com/questions/1672338/how-to-sleep-for-5-seconds-in-windowss-command-prompt-or-dos">from this question</a> that everything up to the NUL causes the script to sleep for 39 seconds.  But I don't know what the rest of the command does.</p>
  
  <p>What does the <code>2&gt;&amp;1</code> do?</p>