what does single colon mean in cmd script except for using as a label? -


as know, single colon ":" can used label , referred "goto" statement, in following code don't know ":" mean here, can me :)

set "str=!str:mode_1=%_mode%!" 2>nul 

thank you!

from set /? message:

environment variable substitution has been enhanced follows:

%path:str1=str2% 

would expand path environment variable, substituting each occurrence of "str1" in expanded result "str2". "str2" can empty string delete occurrences of "str1" expanded output. "str1" can begin asterisk, in case match beginning of expanded output first occurrence of remaining portion of str1.

so !str:mode_1=%_mode%! replace instance of "mode_1" in str value of variable %_mode%. (the exclamation marks being used delayed expansion of str)


Comments

Popular posts from this blog

sql - VB.NET Operand type clash: date is incompatible with int error -

SVG stroke-linecap doesn't work for circles in Firefox? -

python - TypeError: Scalar value for argument 'color' is not numeric in openCV -