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
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