Question

If you have a remark before the end of a block it gives a error. ) was unexpected at this time

example code:

@echo off
set x=1
if %x% == 1 (
    set y=4
    set z=5
::Hello world
)

Does any one know way it has this error?

No correct solution

OTHER TIPS

You cannot use :: for remarks when inside brackets (). You must instead use REM

@echo off
set x=1
if %x% == 1 (
    set y=4
    set z=5
rem Hello world
)
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top