Commenting multiple lines in DOS batch file

user219628 picture user219628 · Dec 15, 2011 · Viewed 102.9k times · Source

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?

Answer

pdubs picture pdubs · Dec 15, 2011

You can use a goto to skip over code.

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