📅  最后修改于: 2022-03-11 14:58:05.739000             🧑  作者: Mango
@echo OFF
setlocal EnableDelayedExpansion
if "%1" == "" (
set pattern=*
) else (
set pattern=%1
)
set i=0
for %%g in (%pattern%) do (
set /A i+=1
echo [!i!] %%g
)