Question

I can, according to example replace , with m,

@set str=abc,xyz
@echo %str:,=m%

However, I cannot replace it with ampersand,

@set str=abc,xyz
@echo %str:,=&%
Was it helpful?

Solution

@echo %str:,=^&%

you need to escape it

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top