1
我有一个从命令行接受参数的批处理脚本。其中一个论据有*。尽管将参数放在引号中,在批处理脚本中使用参数之前*会展开。Windows批处理文件命令行参数中的星号(*)得到扩展
我使用下面的代码来解析参数:
set CMDLINE_ARGS=%~1
shift
:get_args
if "%~1" == "" goto execute
set CMDLINE_ARGS=%CMDLINE_ARGS% %~1
shift
goto :get_args
这适用Windows Server 2003上,但不能在Server 2008中的某些原因。
你会期望这样做,它现在做什么?它扩大了什么? – GolezTrol 2013-02-09 09:06:36