Used for remarks in batch files, preventing the content of the remark from being executed.
REM A remark that does not get executed echo Hello REM This remark gets displayed by echo echo Hello & REM This remark gets ignored as wished :: This sentence has been marked as a remark using double colon.
REM is typically placed at the beginning of a line. If placed behind a command, it does not work, unless preceded by an ampersand, as shown in the example above.
Double colon (
::) is an alternative to REM. It can cause trouble when used in the middle of sequences in parentheses, like those used in FOR loops. The double colon seems to be just a trick, a label that starts with a colon.
- rem at ss64.com
- rem at Microsoft
- Which comment style should I use in batch files?, stackoverflow.com
$ rem /? Records comments (remarks) in a batch file or CONFIG.SYS. REM [comment]
Found a mistake? Have a question or improvement idea? Let me know.
Table Of Contents