REM


Type: Internal (1.0 and later)

Syntax:

REM [comment]

Purpose: Provides a way to insert remarks (that will not be acted on) into a batch file.

Discussion

During execution of a batch file, DOS will display (but not act on) comments which are entered on the line after the REM command.
You cannot use separators in the comment except the space, tab, and comma. To keep DOS from interpreting commands in a comment line, enclose the command in quotes.

For more information on the REM command, refer to Chapter 6, Tips for Advanced Users.

Option

comment - Any text up to 127 characters.

Examples

To add a comment to a batch file, enter

REM This is a comment line
To add a line to a batch file and to keep it from being displayed when the batch file is run, you must first turn the ECHO feature off. To keep the REM comment line from being displayed, enter

echo off
rem This comment line will not be displayed


Back to the Easy DOS Command Index