It's programming time!/Batch/Echo
From Create Your Own Story
< It's programming time! | Batch(Difference between revisions)
m |
m |
||
Line 24: | Line 24: | ||
''Remember: Don't edit the batch file while it's running. You can get unexpected errors that way.'' | ''Remember: Don't edit the batch file while it's running. You can get unexpected errors that way.'' | ||
+ | *[[It's_programming_time!/Batch/Echo/More|'''echo''' is great! I can't get enough!]] | ||
*[[It's_programming_time!/Batch/Rem|Wait, what's '''rem'''? How does it work?]] | *[[It's_programming_time!/Batch/Rem|Wait, what's '''rem'''? How does it work?]] | ||
*[[It's_programming_time!/Batch/At_Symbol|Why don't we need the '''@''' symbol after '''echo OFF'''?]] | *[[It's_programming_time!/Batch/At_Symbol|Why don't we need the '''@''' symbol after '''echo OFF'''?]] |
Current revision as of 02:35, 16 July 2016
Echo
The ECHO command repeats back messages or toggles the command prompt display. It's one of the most basic batch commands.
Let's see what echo can do for you:
- Create a new batch file like we did earlier and open it in your text editor.
- Add the following lines to the file:
@echo Using echo without any following text will give you a status message @echo @echo OFF echo "echo OFF" can also be used to disable the command prompt display. rem @echo OFF is a good line to start your batch files with. echo Now we no longer need to use the @ symbol in front of each command. echo pause
- Save your file without any formatting (Plain text).
- Double click your .bat file to execute the commands.
Remember: Don't edit the batch file while it's running. You can get unexpected errors that way.