Search code examples
batch-filecommentsdosmultiline

Commenting multiple lines in DOS batch file


I have written huge MS DOS Batch file. To test this batch file I need to execute some lines only and want to hide/comment out remaining.

I have some existing comment lines starting with :: hence I cannot use :: anymore as it will scramble all comments.

How can I solve this problem?


Solution

  • You can use a goto to skip over code.

    goto comment
    ...skip this...
    :comment