盒子
盒子
文章目录
  1. for loop

cmd commands

for loop

1
2
3
4
5
6
7
for /l %%x in (1, 1, 3) do (
echo %%x
)
for %%x in ("300" "500" "1999") do (
echo %%x
)

update variables in for loop, put setlocal enabledelayedexpansion in the start of the file, and use !var!to reference a variable.

echo xxx>>filecan be used to append text to a file, but there should be echo xxx>file to create the file.