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 /? Records comments (remarks) in a batch file or CONFIG.SYS. REM [comment]