Batch file print text to screen
Ask Question. Asked 5 years, 4 months ago. Active 28 days ago. Viewed 15k times. ECHO is off. Raktim Biswas 3, 5 5 gold badges 24 24 silver badges 30 30 bronze badges. Beaux Beaux 21 1 1 gold badge 1 1 silver badge 8 8 bronze badges. You probably haven't set those variables. I also recommend starting a variable with a letter, because starting a variable with numbers won't always work. You seem to be confusing environment variables with command-line argument parameters.
Add a comment. Active Oldest Votes. Community Bot 1 1 1 silver badge. Raktim Biswas Raktim Biswas 3, 5 5 gold badges 24 24 silver badges 30 30 bronze badges.
Bill Harding Bill Harding 19 1 1 bronze badge. The simplest way using just DOS is echo. This method even works in a Windows 7 x64 Command window. Stanley Zheng 1 1 gold badge 5 5 silver badges 19 19 bronze badges. Martin Whittaker Martin Whittaker 11 2 2 bronze badges. FYI, Stackoverflow supports markdown syntax. Hayz Hayz 4 4 bronze badges.
Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password. Post as a guest Name. Email Required, but never shown.
The Overflow Blog. Podcast Making Agile work for data science. Stack Gives Back Featured on Meta. New post summary designs on greatest hits now, everywhere else eventually.
Related Stdin is file 0, stdout is file 1, and stderr is file 2. A very common task in batch files is sending the output of a program to a log file. For example, you can write a listing of the current directory to a text file:.
You can redirect stderr by using the file number 2 in front of the operator:.
0コメント