Computer and Software Support

DOS Command Rem

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.

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


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

This page is from I pasted it on my website to avoid possible broken links. For further help with DOS commands, Check out.