Click to See Complete Forum and Search --> : Clear screen character


csaba2000
January 12th, 2005, 07:29 AM
I'd like to know, please, if there is a single character which will clear a DOS (cmd) screen. A character based CLS, if you will.

Motivation: On my WinXP PRO system, I am using PHP from the command line to run a program which produces output to my DOS box (that I'm running PHP from). This program will run for quite a while (hours) and from time to time, I'd like to update the stats that the user (me) will see on the screen.

Ways I don't like: Putting in a bunch of newlines (whether it be 0 or a thousand) between stat updating. If the number is few, the screen is very busy/messy and if the number is large, the output will always be at the bottom of the screen (and I don't know how to programatically find the number of lines the DOS box has (I've usually stretch it)).

Thanks,
Csaba Gabor

davidcarta
September 20th, 2005, 04:11 PM
Found this on the Web
http://www.scit.wlv.ac.uk/cbook/chap1.Codes.html

014 0x0c "\f" Ctrl-L FF New Page or Clear Screen