I am searching for file named file.txt and want to store the path of these files in a variable which should be in dynamic nature. I am using arrays but not able to increment the value of i
@echo on
D:
cd D:\study\
setlocal enableDelayedExpansion
set /a i=1
for /r %%G in (find.*txt) do (
set /a i=%i%+1
echo %i%
set obj[%i%]=%%G
)