parentheses ( ) must be properly escaped as ^( ^) within a bracketed code block.īatch and WSF Hybrid Comment ), only works in WSF.
any cmd poisonous characters | & must be properly escaped as ^| ^ ^&,.
an inline comment may not contain any double quote,.
syntax with double quotes set "varname=varvalue" or set "varname=",.
You can also use & or || to replace &.Įcho This is another test &rem This is another commentĪ curiosity: SET command allows limited inline comments without &rem: set "varname=varvalue" limited inline comment here To comment on the same line as the code you can use &:: or &rem. Since the parser never sees the lines between the goto :start statement and :start label it can contain arbitrary text (including control characters without the need to escape them) and the parser will not throw an error. Comments are used to show information in a batch script.