我有两层(以后可能会更多)的批处理文件,这使得我的生活变得更轻松,直到我试图添加路径,其中有空格。
批处理文件1:
@echo off
set thinga=c:\final build
set thingb=\\server\deployment for final buil
echo.
echo thing a: %thinga%
echo thing b: %thingb%
echo.
call lala.bat "%thinga%" "%thingb%"
批处理文件2(lala.bat):
@echo off
echo.
echo. Param 1 %1
echo. Param 2 %2
echo.
set BASE=%1
set TARGET=%2
echo. Want to run:
echo. doSomethingOnBaseFolder %BASE%
echo. doSomethingOnBaseSubFolder "%BASE%\bin\release\*" "%TARGET%\"
echo.
其结果是:
doSomethingOnBaseSubFolder ""c:\final build"\bin\release\*" ""\\server\deployment for final buil"\"
但我希望输出
doSomethingOnBaseSubFolder "c:\final build\bin\release\*" "\\server\deployment for final buil\"
没有别的办法逃离这个空间吗?