JSI Tip 9596. How can I emulate the CLS command without clearing the screen buffer?

When you type CLS in a CMD.EXE window, the entire screen buffer is cleared and the cursor is in the home position.

If you wish to clear the visible screen, without clearing the screen buffer, download SCROLL.EXE.

NOTE: SCROLL.EXE works when the screen buffer is taller than the window (a vertical scroll bar exists). If you are the end of the screen buffer, it does nothing.

NOTE: You can define a DOSKEY macro making cls = scroll. See How do I open a command prompt with my favorite DOSKEY macros defined?.

NOTE: See How do I clear the visible portion of the screen buffer?

Hide comments


  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.