(0) exportieren Drucken
Alle erweitern
Arp
At
Cd
Cls
Cmd
Del
Dir
Fc
For
Ftp
If
Ldp
Lpq
Lpr
Md
Mmc
Msg
Nlb
Rcp
Rd
Reg
Rem
Ren
Rsh
Rsm
Rss
Sc
Set
Sfc
Ver
Vol
Erweitern Minimieren

Rem

Letzte Aktualisierung: September 2007

Betrifft: Windows 7, Windows Server 2000, Windows Server 2003, Windows Server 2003 R2, Windows Server 2008, Windows Server 2008 R2, Windows Vista, Windows XP

Records comments (remarks) in a batch file or CONFIG.SYS. If no comment is specified, rem adds vertical spacing.

For examples of how to use this command, see Examples.

Syntax

rem [<Comment>]

Parameters

 

Parameter Description

<Comment>

Specifies a string of characters to include as a comment.

/?

Displays help at the command prompt.

Remarks

  • The rem command does not display comments on the screen. You must use the echo on command in your batch or CONFIG.SYS file to display comments on the screen.

  • You cannot use a redirection character (< or >) or pipe (|) in a batch file comment.

  • Although you can use rem without a comment to add vertical spacing to a batch file, you can also use blank lines. Blank lines are ignored when a batch program is processed.

Examples

The following example shows a batch file that uses remarks for comments and for vertical spacing:

@echo off
rem  This batch program formats and checks new disks.
rem  It is named Checknew.bat.
rem
rem echo Insert new disk in Drive B.
pause 
format b: /v chkdsk b: 

To include an explanatory comment before the prompt command in your CONFIG.SYS file, add the following lines to CONFIG.SYS:

rem Set prompt to indicate current directory
prompt $p$g

Additional references

Fanden Sie dies hilfreich?
(1500 verbleibende Zeichen)
Vielen Dank für Ihr Feedback.

Community-Beiträge

HINZUFÜGEN
Microsoft führt eine Onlineumfrage durch, um Ihre Meinung zur MSDN-Website zu erfahren. Wenn Sie sich zur Teilnahme entscheiden, wird Ihnen die Onlineumfrage angezeigt, sobald Sie die MSDN-Website verlassen.

Möchten Sie an der Umfrage teilnehmen?
Anzeigen:
© 2014 Microsoft