Batch File Comments

Recently I needed to add a comment in a batch file and I couldn’t remember how to do it. Google proved somewhat elusive in providing adequate results and so the search took longer than it should have done.

For posterity, you can add a comment to a windows batch file by adding “REM” to the start of the line.

REM This is a comment  
REM This is also a comment  

I was using the batch file to automate the encryption of the system.identity element for multiple sites on a web server. I’ll cover the syntax for that in a separate post.