Sideway
output.to from Sideway
Draft for Information Only

Content

MS DOS Command: REM
 Description
 Syntax
 Parameters
 Related Command
 Remarks
  Using the ECHO command to display comments
  Restrictions on characters in batch-file comments
  Using REM to add vertical spacing
 Examples

MS DOS Command: REM

Reference from Microsoft MS-DOS cmd help

Description

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.

Remarks

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.

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


©sideway

ID: 110700245 Last Updated: 7/29/2011 Revision: 0


Latest Updated LinksValid XHTML 1.0 Transitional Valid CSS!Nu Html Checker Firefox53 Chromena IExplorerna
IMAGE

Home 5

Business

Management

HBR 3

Information

Recreation

Hobbies 8

Culture

Chinese 1097

English 339

Travel 18

Reference 79

Computer

Hardware 254

Software

Application 213

Digitization 37

Latex 52

Manim 205

KB 1

Numeric 19

Programming

Web 289

Unicode 504

HTML 66

CSS 65

SVG 46

ASP.NET 270

OS 431

DeskTop 7

Python 72

Knowledge

Mathematics

Formulas 8

Set 1

Logic 1

Algebra 84

Number Theory 206

Trigonometry 31

Geometry 34

Coordinate Geometry 2

Calculus 67

Complex Analysis 21

Engineering

Tables 8

Mechanical

Mechanics 1

Rigid Bodies

Statics 92

Dynamics 37

Fluid 5

Fluid Kinematics 5

Control

Process Control 1

Acoustics 19

FiniteElement 2

Natural Sciences

Matter 1

Electric 27

Biology 1

Geography 1


Copyright © 2000-2025 Sideway . All rights reserved Disclaimers last modified on 06 September 2019