What's the equivalent of
# for Windows
cmd console sessions, to create a comment?
The operating system is Windows XP.
You could also use the double-colon convention commonly seen in batch files:
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
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 (
To prevent these lines from being shown you can do one of three things.
I believe the answer provided by bernhard is incorrect.
At least through win 7,
in a batch file will print in the output. To suppress printing, use
The same goes for other commands, which by default are echoed to the console.
You prefix your comment with the word REM.
But if you want your comment printed back to you, you should echo it:
Thank you for your interest in this question.
Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site.
Would you like to answer one of these unanswered questions instead?