Command: @ (at)
The at-sign @ disables the echo status right for this line in
a BATCH FILE or in AUTOEXEC.BAT / FDAUTO.BAT.
If you enter a command in command line the command will be executed
immediately. When executing a command from a batch file without at-sign
@ it is first given from batch to command line, shown there, and then
executed. @ avoids this.
Syntax:
@command
Options:
- none -
Comments:
@command: Instead of ECHO ON / OFF you can place an @ character in
front of each BATCH command you do not want to show.
@ECHO OFF: Disables the echo status in the batch file. Because the
at-sign @ disables the echo status right for this line, this command
disables echoing all the next lines of a batch script and is not
echoed to the console itself. It is, therefore, best placed in the
first line of a batch script.
@ECHO ON: Enables the echo status. Because the at-sign @ disables
the echo status right for this line, this command enables echoing all
the next lines of a batch script and is not echoed to the console
itself.
@ is no existing command but part of the commands in a batch file:
As it is often in use there is an own "command" here to show
where and how it can be used.
Examples:
IN A BATCH FILE:
Example 1:
chkdsk c:
pause (repeats the chkdsk c: command and then executes it)
Example 2:
@chkdsk c: (same as Example 1 but the chkdsk c: command is not
repeated, only executed)
pause
Example 3:
@echo on (repeats ALL commands except "echo on" before execution)
chkdsk c:
pause
dir c:
pause
Example 4:
@echo off (repeats none of the commands before execution)
chkdsk c:
pause
dir c:
pause
@ECHO OFF Disables the ECHO status. Because the at-sign @ disables the
ECHO status right for this line, this command disables echoing all the
next lines of a batch script and is not echoed to the console itself.
It is, therefore, best placed in the first line of a batch script.
See also:
autoexec.bat/fdauto.bat
batch files
command.com/freecom
config.sys/fdconfig.sys
echo
Copyright © 2004 Robert Platt, updated 2011 and 2022 by W. Spiegl.
This file is derived from the FreeDOS Spec Command HOWTO.
See the file H2Cpying for copying conditions.