Enables you to include comments in a batch file or in your CONFIG.SYS file. The REM command - (or double colon (::) in batch files), is also useful for disabling commands. (You can use a semicolon (;) instead of the REM command in your \CONFIG.SYS (Win9x \MSDOS.SYS & REG files), but not in batch files)
For information about displaying messages, see the
Equivalent Linux BASH commands:
### - Comment / Remark.
The REM command does not display comments on the screen. You must use the ECHO ON command in your batch or CONFIG.SYS file in order to display comments on the screen.
You cannot use a redirection character (> or <) or pipe (|) in a batch-file comment.
You can redirect to create zero-length files in DOS and WIN, but NOT in NT.
Although you can use REM without a comment to add vertical spacing to a batch file, you can also use blank lines. The operating system ignores the blank lines when processing the batch program.
This 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. REM ECHO Insert new disk in drive B. PAUSE FORMAT B: /V CHKDSK B:
Suppose you want to include in your CONFIG.SYS file an explanatory comment before the COUNTRY command. To do this, add the lines to CONFIG.SYS:
REM Set country code to France COUNTRY=033
This example shows a DEVICE command that has been disabled by using a semicolon (;) instead of the REM command: