|yes you right,|
the only way to capture outut from a command into a variable is to use a for loop, so you would need two for-loops.
I have one more big problem
It seems that:
for /f %%a in ('dir /b/a-d' | find /v /c ""') do set count=%%a
will count only files of type text (*.txt)
The problem is that the files that will be stored in the folder are of type *.dat
Can you help me, If I am right using this??
Am I missing anything here?
Dir /b particular_Folder>dir_p_f.txt
for /f %%a in (dir_p_f.txt) do set /a count+=1
Now, the number of files in the folder should be %count%
Can I countinue to use the second loop?
for /L %%b in (1 1 %count%) do call test.bat %%b