复制代码
- set "MYCMD=%CMDCMDLINE:~-8,8%"
- :: 即注释掉了,也会改动 CMDCMDLINE 的值。
- :: set "MYCMD=%CMDCMDLINE:~-8,8%"
- @rem set "MYCMD=%CMDCMDLINE:~-8,8%"
复制代码
- :: set "var="1^"2^"3""
- :: echo.s90=%var%
- :: set var=%~var%
- :: echo.s90=%var%
- :: 还会提示 %~var% 错误
欢迎光临 批处理之家 (http://www.bathome.net/) | Powered by Discuz! 7.2 |