-------------------------- MS-DOS v6.22 Help: REM --------------------------
<Notes> <Examples> <Index>
----------------------------------------------------------------------------
REM
Enables you to include comments in a batch file or in your CONFIG.SYS file.
The REM command is also useful for disabling commands. (You can use a
semicolon (;) instead of the REM command in your CONFIG.SYS file, but not in
batch files.)
Syntax
REM [string]
Parameters
string
Specifies any string of characters -- the command you want to disable or
the comment you want to include.
Related Command
For information about displaying messages, see the <ECHO> command.
***
<Syntax> <Examples>
----------------------------------------------------------------------------
REM--Notes
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.SYS file in order to display
comments on the screen.
Restrictions on characters in 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. MS-DOS ignores the blank lines
when processing the batch program.
***
<Syntax> <Notes>
----------------------------------------------------------------------------
REM--Examples
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.
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 following lines to
CONFIG.SYS:
rem Set country code to France
country=033
The following example shows a DEVICE command that has been disabled by using
a semicolon (;) instead of the REM command:
;device=c:\dos\ramdrive.sys
***
----------------------------------------------------------------------------
<Top of page>
|
Last update: December 07, 2002 14:45 by Content © 1997 Microsoft Corporation All else © 2000-2005 |