bat中没有数组的概念,可以通过有[]的多个变量来存储一组值,形成一个数组
@echo off & setlocal enabledelayedexpansion set aa=0 for /f "eol=/delims=" %%b in (1.txt) do ( echo %%b set /a "bds[!aa!] = %%b",aa=aa+1 echo !aa! )