I was trying to find a way to clear (CLS) a single line (see This Question), but found that the solutions, which involved moving the cursor, required extra software or modifications to files, which is not ideal.
However, I later noticed that the TIMEOUT command actually moves the cursor, which can be demonstrated with the following code:
@ECHO off
ECHO Notice how the cursor moves to the number.
ECHO Press [Ctrl]+[C] for an interesting result.
PAUSE
ECHO(
TIMEOUT 99999
PAUSE
If Ctrl+C is pressed after a couple of seconds, the "Terminate Batch Job" prompt overwrites the TIMEOUT output after the number. Any typing also continues to overwrite it.
What I am looking for, is any way to clear a line, change the line, or move the cursor somewhere, and also anything similar that could be useful. (I know this is a bit vague)
One idea was if it was possible to modify the stdout in such a way that the cursor still moved, it would at least be possible to get a changing number at one point in a custom line.
It might also be possible to asynchronously do both TIMEOUT and ECHO commands to have a similar effect to Ctrl+C.
Redirecting the TIMEOUT stdout to nul gives no LF character. This in conjunction with:
<nul SET /P var=#
REM echo without a LF character
...Could possibly be used to create progress bars.
Any thoughts, ideas, or other commands with similar effects are welcome.