Enables you to include comments (remarks) in a batch file or in your configuration files.

rem [comment] 


Specifies any string of characters you want to include as a comment.

Using the echo command to display comments

The rem command does not display comments on the screen. You must use the echo on command in your batch or CONFIG.NT file in order to display comments on the screen.

Restrictions on batch-file comments

You cannot use a redirection character (< or >) or pipe (|) in a batch-file comment.

Using rem to add vertical spacing

Although you can use rem without a comment to add vertical spacing to a batch file, you can also use blank lines. Windows NT ignores the blank lines when processing the batch program.


The following example shows a batch file that uses remarks for both explanations and vertical spacing:

@echo off 
rem  This batch program formats and checks new disks. 
rem  It is named CHECKNEW.BAT. 
echo Insert new disk in drive B. 
format b: /v 
chkdsk b: 

Suppose you want to include in your CONFIG.NT file an explanatory comment before the prompt command. To do this, add the following lines to CONFIG.NT:

rem Set prompt to indicate current directory
prompt $p$g

See Also