@echo off
set Counter=0
set folders=(14370437 14707356 16048938 16818856)
for %%f in (*.jpg) do call :p "%%f"
goto :eof
:p
set /a Counter+=1
set /a X=Counter %% 6
%name% = folders[Counter] ???
mkdir C:\output\%name%
if %X%==1 copy %1 C:\output\%name%\front-image.jpg
goto :eof
I have a static list of folder names (the list is much longer than this example) and another function where I need to use them. I loop through a bunch of .jpg files and need to copy each one to the next folder in the list (also create the folder)
I couldn't find a way to retrieve an element from the list (or array?) folders, by index.