使用 “记事本” 更新游戏(4) xcopy /s /e /d /y \\FilmServer\GameUpdate\"Legend of Mir" D:\Games\"Legend of Mir" ) Else ( @echo 本台机器今天不更新! ) Exit---------------------------------------------------------------------------------------------------------- 注释: for /f "skip=1 tokens=1" %%N IN (\\FilmServer\GameUpdate\Config.ini) Do if %ComputerName%==%%N ( ::: for 批处理的循环指令 /f 循环是在一个文件中的开关命令 skip=1 忽略第一行 tokens=1 从第一列开始 %%N 读取的内容存入变量(N)中 IN 批处理的循环指令 Do 批处理的循环指令
(\\FilmServer\GameUpdate\Config.ini) 指定要循环的文件