Site icon TechnologiesPosts

How can I “comment-out” a section in a batch file?

The REM statemen

This is the most common way to write comments. Any line in your bat-file that starts with REM is completely ignored by the command-processor.

     REM This bat-file moves all files in C:Incoming to C:ToProcess
     REM Written by Nikunj Kansara
     REM 05/01/2003
Double Colons

Alternatively you can replace the word REM by two colons. This style of comments is not very common, so I would suggest to stay clear from it.

     :: This bat-file moves all files in C:Incoming to C:ToProcess
     :: Written by Nikunj Kansara
     :: 05/01/2003

Share your Love
Exit mobile version