Which comment style should I use in batch files?

I’ve been writing some batch files, and I ran into this user guide, which has been quite informative. One thing it showed me was that lines can be commented not just with REM, but also with ::. It says:

Comments in batch code can be made by using a double-colon, this is better than using the REM command because labels are processed before redirection symbols. ::<remark> causes no problems but rem <remark> produces errors.

Why then, do most guides and examples I see use the REM command? Does :: work on all versions of Windows?

10 Answers
10

Leave a Comment