1 min read

how can I add comments to a batch file?

The REM statement

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

Leave a Reply

Your email address will not be published. Required fields are marked *