I have a question at the Windows 10 command prompt.
dir>tmp.txt
Create a batch file that says and name it test.bat .
This is done at the command prompt.
D:\>test
D:\>dir1>tmp.txt
appears with a half-width "1" in front of the redirect symbol.
Also, the half-width space after the redirect symbol disappears.
The contents of tmp.txt are fine.
Why are instructions different from the contents of the batch file printed?
Does this 1 mean the standard output STDOUT?
The batch file is S-JIS and the command prompt is CP932.
Batch files-How To...Display and Redirect Output reads:
When use > to redirect Standard Output, CMD.EXE interprets this as 1>, as can be seen by writing and running...
I edited this post based on @metropolis's Comment and posted it as Community Wiki.I edited this post based on @metropolis's Comment and posted it as Community Wiki.
© 2024 OneMinuteCode. All rights reserved.