Duplicate of Passing a variable in batch file to another batch file with FOR loop to process list of folders
For loop can't access variables with %%. Reason why the code was messed up and didn't work. It's working now. This is just an example on how to access variables within loops. abc.bat
@ECHO OFF
SETLOCAL EnableDelayedExpansion
SET mnp=90
FOR /L %%i IN (1,1,5) DO (
SET /a mnp+=1
CALL def.bat !mnp!
)
PAUSE
and def.bat
ECHO %~1 %~2