Rem
Allows you to include comments in a batch file or a configuration file.
Grammar
REM [Comment]
Parameters
Comment
Specifies any string to be used as a comment.
/?
Displays help at the command prompt.
Comments
? Using the echo command to display annotations
The REM command does not display annotations on the screen. You must use the Echoon command in a batch or Config.nt file to display annotations on the screen.
? Restrictions on comment on batch files
You cannot use the redirection character "(" or ")" or the Pipeline (|) In a batch file comment.
? Use REM to increase vertical spacing
You can use REM without annotations to increase the vertical spacing for batch files, or you can use blank lines to increase spacing. Blank lines are ignored when processing batch programs.
Example
The following example shows a batch file that uses annotations for both interpretation and vertical spacing:
@echo off rem This batch 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 add a descriptive comment before the prompt command in the Config.nt file, add the following line to the Config.nt:
REM Set prompt to indicate current directory prompt $p $g
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.