April 2002
Beginner
640 pages
27h 54m
English
rem — Internal to: \Windows\command.com
Insert comments
(“remarks”) into a batch file.
Lines beginning with rem will be ignored when the
batch file is executed.
rem [comment]
The comment can say whatever you want. It’s a good idea to put comments in your batch file so that others (including you in the distant future) can figure out how it works.
The rem command is also useful for disabling
commands. Just add rem right before the command to
disable it.
A batch file that uses remarks for explanations and to disable a command:
@echo off rem This batch program may one day change a directory. rem But not until I remove the rem before the cd command. rem It is called mydir.bat. rem cd \batch\ch2
This example, if executed, would do absolutely nothing.
Read now
Unlock full access