Use "& ::" to make an in-line comment:
echo code_goes_here & :: comment goes here
:: This is a comment.
@Rem Also a comment.
:: This is a comment
REM This is also a comment
:: This is a comment line
Use :: or REM
Eaxmple:
:: comment goes here
REM comment goes here
Inline comments:
commands go here & :: comment goes here
:: This is a comment
REM This is also a comment
echo Hello world & :: This is an inline comment
'Simply add :: before the offending line'
Example:
echo this will print
:: echo but this wont
:: This is a comment that won't be printed
- or -
REM This is a comment that will be printed
ECHO "Hello" & :: This command prints 'Hello'
- or -
ECHO "Hello" REM This command prints 'Hello'
Rem This is a comment
:: This is another comment
:: This is a comment is batch