1
2
3
set a="asd 123"
if "%a%" neq "%a: =%" ( set a=%a: =kg% )
pause

判断字符串是否包含空格,把空格替换完“kg”;
��;