It is always a good idea to write comments in your bat-files. Your comments will help you to understand your own bat-files later on. More important: they help others to understand how it all works.
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 Gert Rijs REM 05/01/2003
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 Gert Rijs :: 05/01/2003
Very often you would like to write multiple lines of comment. Having to write the
word REM at the start of each line is getting very distracting. A bigger problem is
when you want to edit existing comments and want the result to be nice looking.
A simple solution is to jump over your comments by using a GOTO statement.
GOTO EndComment This bat-file moves all files in C:\Incoming to C:\ToProcess Written by Gert Rijs 05/01/2003 :EndComment
To help others understand what is going on, be sure to name the goto-label something like EndComment.
All trademarks are the property of their respective owners.
Please send comments, questions, suggestions and so forth to Support.
Copyright © GdP Software 2003-2005, All rights reserved.