One method is to start the line with REM followed by a space or tab character, then the comment.
Another method is to start the line with colons - :: - which creates a label without naming the label.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Is there a way to comment out lines in a Windows .bat or .cmd file? Sorry, but I'm drawing a blank on this basic question.
Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.
One method is to start the line with REM followed by a space or tab character, then the comment.
Another method is to start the line with colons - :: - which creates a label without naming the label.