ref: How do I do comments at a Windows command prompt?
REM
is the standard way:
REM this is a comment
You could also use the double-colon convention commonly seen in batch files:
:: another comment
A single colon followed by a string is a label, but a double colon and anything after it are silently ignored. One could argue that this form is more legible than the REM
command.
Note that both of these methods only work at the beginning of a line. If you want to append a comment to a command, you can use them with the command concatenation character (&
), like this:
dir & REM a comment
dir &:: another one
标签:comment,893,CMD,batch,comments,command,REM,colon
From: https://www.cnblogs.com/alex-bn-lee/p/17751457.html