![]() GdP Software |
Contact Shop |
Products Faq |
The ECHO statement has two separate uses:
1. It controls the display of all commands in your .bat file.
2. Display information you want
Most .bat files you will see start with the following line of code:
@echo off
This causes the command interpreter (command.com or cmd.exe), to suppress the display of
all following commands in your .bat file.
The @, that can be used on any line in your .bat file, causes the interpreter to
also suppress the display of the "echo off" line.
Try to run the following .bat file
REM @echo off echo Hello
The REM statement is described here, by the way. If you run the previous lines the output will be like:
C:\Documents and Settings\Gert Rijs>REM @echo off C:\Documents and Settings\Gert Rijs>echo Hello Hello C:\Documents and Settings\Gert Rijs>
So, you see every line of your .bat file printed as it runs. This can be very nice if you are
writing a new .bat file, you can see all output and errors as it is run. When you are finished
writing, you might like the output to be slightly less cluttered.
Remove the REM from the first line, so your .bat file looks like:
@echo off echo Hello
Now run it again, your output should resemble:
Hello
All trademarks are the property of their respective owners.
Please send comments, questions, suggestions and so forth to Support.
Copyright © GdP Software 2003-2005, All rights reserved.