1. for循环
@echo off for /L %%a in (1,1,10) do ( echo %%a ) pause goto :eof :eof
2.函数调用
@echo off set root=donothing/ call :print_info whatinfo pause goto :eof :: functions :: print_info start :print_info set _final=%~1 set _target=%root%%_final% echo %_target% goto :eof :: print_info end
标签:脚本,info,bat,set,eof,常用,echo,print,goto From: https://www.cnblogs.com/keroleo/p/16996356.html