Strange bug when CMD /? is redirected to CON
Posted: 27 Nov 2016 19:25
The CMD /? or HELP CMD commands show the help on cmd.exe usage in the screen; this works correctly even if the output is redirected to a disk file. However, if the output is redirected to CON, a strange bug happen:
The text appear in the screen in just one line with strange characters, but it seems that some characters are LF's because the line was expanded when I pasted it.
The purpose of this redirection is show the cmd.exe help without pauses. When IF /?, FOR /?, SET /? or CMD /? commands are executed, the output pauses at each page and there is no way to avoid this point. I discovered that redirecting the output to CON show the help on the screen with no pauses, but this fail in the case of CMD /? Windows 8.1 Spanish here...
Antonio
Code: Select all
C:\Users\Antonio\Documents\Tests> ver
Microsoft Windows [Versión 6.2.9200]
C:\Users\Antonio\Documents\Tests> cmd /? > CON
s, conservando el
texto que venga después de ésta.
n
?.
ión.
.
C:\Users\Antonio\Documents\Tests> help cmd > CON
s, conservando el
texto que venga después de ésta.
n
?.
ión.
.
C:\Users\Antonio\Documents\Tests>
The text appear in the screen in just one line with strange characters, but it seems that some characters are LF's because the line was expanded when I pasted it.
The purpose of this redirection is show the cmd.exe help without pauses. When IF /?, FOR /?, SET /? or CMD /? commands are executed, the output pauses at each page and there is no way to avoid this point. I discovered that redirecting the output to CON show the help on the screen with no pauses, but this fail in the case of CMD /? Windows 8.1 Spanish here...
Antonio