Answers for "for loop find by index in cmd"

0

for loop find by index in cmd

@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
)
Posted by: Guest on October-29-2020

Browse Popular Code Answers by Language