Rem
Updated: January 21, 2005
Syntax
Parameters
Remarks
-
Using the echo command to display comments
The rem command does not display comments on the screen. You must use the echoon command in your batch or Config.nt file 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. The blank lines are ignored when processing the batch program.
Examples
@echo off rem This batch program formats and checks new disks. rem It is named Checknew.bat. rem echo Insert new disk in drive B. pause format b: /v chkdsk b:
To include an explanatory comment before the prompt command in your Config.nt file, add the following lines to Config.nt:
rem Set prompt to indicate current directory prompt $p$g
Formatting legend
Format | Meaning |
Italic | Information that the user must supply |
Bold | Elements that the user must type exactly as shown |
Ellipsis (...) | Parameter that can be repeated several times in a command line |
Between brackets ([]) | Optional items |
Between braces ({}); choices separated by pipe (|). Example: {even|odd} | Set of choices from which the user must choose only one |
Courier font | Code or program output |