Home > Commands A-M > Batch A

@


Description | Syntax | Parameters | Switches | Related | Notes | Examples | Errorlevels | Availability

Used before a batch command so that the command will not be displayed before it is executed.


Syntax

@[command]


Parameters
command (v3.30 Win95 NT4)
Any batch command or program.

Switches

none.


Related

Most commonly used with ECHO.


Notes
Prefix what with @?

The at-sign (@) can be prefixed to any DOS command, program name or batch file name -- when used in a batch file.


Where does the command output go?

It makes the command "silent"; ie, the command itself is NOT echoed to the screen. Any output generated by the command IS echoed.

Think of this as one-line-only version of ECHO OFF. It lets you write 'clean' batch files and is most often used in the ECHO OFF command itself (eg, @ECHO OFF), to make sure that everything displayed by the batch is under programmer control.


Use @ to space out logical batch sections

Use @ on a blank line to space out logical sections of your batch files -- without causing the DOS prompt to be displayed.


Examples

If you want to see the command displayed before it runs:

    DIR

IF you don't want to see the command displayed:

    @DIR

Errorlevels

none.


Availability
Internal
DOS
v3.30 v3.3A v3.3R v3.3T v3.31 v3.40 v4.0 v4.01 v4.01A v5.0 v5.0A v5.00.02 v5.001A v5.01 v5.02 v6.0 v6.10 v6.2 v6.21 v6.22 v6.23 v7.00 v7.0R1 v7.10 v8.00
Windows
Win95 Win98
Windows NT
NT4 NT2000 NTXP