Type: Internal (1.0 and later)


REM [comment]

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


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.


comment - Any text up to 127 characters.


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

Return to Mission Control home page         Return to DOS Command index page