@echo off echo. ::取游戏名字列表 call b_game_names.bat echo gameNameList: %game_names% ::在dao循环中要对变量再编辑的du话,要启用延zhi迟变量的设置,用setlocal命令,具体dao的你输入版setlocal /?看帮助,它一般是跟权endlocal配对使用 SETLOCAL ENABLEDELAYEDEXPANSION for %%i in (%game_names%) do ( if defined tscPaths ( set tscPaths=!tscPaths! ..\..\game\%%i\main\src\core )else ( set tscPaths=..\..\game\%%i\main\src\core ) ::set tscPaths=!tscPaths! ..\..\game\%%i\main\src\ttGame ::set tscPaths=!tscPaths! ..\..\game\%%i\main\src\trGame set tscPaths=!tscPaths! ..\..\game\%%i\main\src\webGame ) echo tsc -b !tscPaths! tsc -b !tscPaths! ::tsc -b core Fruit Legend DDZ Glory Dragon LHD ENDLOCAL echo tsc complete pause