title: CLS (clear) a single line?
body: <p>Is there any way to <code>CLS</code> a single line of output? I don't believe there are any switches for <code>CLS</code>, so maybe a better question would be: <br /></p>
  
  <p>Is there any way to</p>
  
  <ol>
  <li>retain all previous output for re-use? <br />
  <strong>or</strong></li>
  <li>capture currently displayed output (like you can by marking and copying)?</li>
  </ol>
  
  <p>I'm just trying to make my scripts a little more user-friendly by having real-time feedback / information, instead of multiple lines with slight changes. The only way I can think of doing this, though, is like this:</p>
  
  <pre><code>@echo off
  goto Prep
  
  :Prep
      SET count=5
      SET genericMessage=This window will close
  
      goto Output
  
  :Output
      IF NOT %count% == -1 (
          cls
          IF %count% == 0 (
              echo %genericMessage% now.
          ) ELSE (
              echo %genericMessage% in %count% seconds.
          )
          SET /A count=%count% - 1
          ping localhost -n 2 &gt;nul
          goto Output
      ) ELSE (
          exit
      )
  </code></pre>
  
  <p>So, you get this:</p>
  
  <p><img src="https://i.stack.imgur.com/BKRVd.gif" alt="enter image description here"></p>
  
  <p>The problem with this, though, is that <code>CLS</code> erases <strong>all</strong> output, when I only want to refresh one line by erasing and re-outputting it.</p>
  
  <p>Anyone have any ideas?</p>