set motFn=
for /f "eol=[ usebackq" %%i in (`type %confFn%`) do (
set a=%%i
setlocal EnableDelayedExpansion
if "!a:~0,4!"=="motF" set motFn=!a:~5!&echo !a:~5! //此处echo得预期结果
endlocal
)
echo %motFn% //此处echo则得 %motFn%变量为空??
for /f "eol=[ usebackq" %%i in (`type %confFn%`) do (
set a=%%i
setlocal EnableDelayedExpansion
if "!a:~0,4!"=="motF" set motFn=!a:~5!&echo !a:~5! //此处echo得预期结果
endlocal
)
echo %motFn% //此处echo则得 %motFn%变量为空??
