Share via

Comments in batch files

Anonymous
2019-07-29T13:55:06+00:00

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.

Windows for home | Windows 10 | Files, folders, and storage

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.

0 comments No comments

1 answer

Sort by: Most helpful
  1. Anonymous
    2019-07-29T14:03:04+00:00

    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.

    10+ people found this answer helpful.
    0 comments No comments