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

android - Why am I getting the message 'Youractivity.java is not an activity subclass or alias' -

python - How do I create a list index that loops through integers in another list -

c# - “System.Security.Cryptography.CryptographicException: Keyset does not exist” when reading private key from remote machine -