//@echo off后面不显示命令
@echo off
//cd/d D://aa/bb可直接进入d盘
echo 请输入分组名:
//接收用户输入
set /p group_name=
//引用变量
echo 您输入的是:%group_name%
pause
启动多个程序
@echo off
start /b /d "D:\development-software\redis\redis-3.2.100" server-start.bat
echo ##########start redis server##########
start /b /d "D:\development-software\zookeeper\zookeeper-3.4.10\bin" zkServer.cmd
echo ##########start zookeeper server##########
start /b /d "D:\development-software\nginx\nginx-1.12.2" nginx.exe
echo ##########start nginx##########
循环执行
@echo off
:start
127.1是回环地址127.0.0.1,>null表示不显示ping命令的结果,-n 后为秒数,-w后为次数
ping -n 60 127.1>NUL
echo nihao
goto start