Below is a batch file.
set ORIGDIR=%CD%
set OUTPATH=d:\out
set PNGPATH=d:\result.png
set BMPPATH=e:\result.bmp
:Run
setlocal EnableDelayedExpansion
echo data is %~1
set API=%~1
set GRID=%~2
set APPOUTPATH=%OUTPATH%\!API!\!GRID!X!GRID!
md !APPOUTPATH!
echo !APPOUTPATH!
cd /D D:\App!API!\Release
app!API!.exe --input=%~3 --output=!APPOUTPATH!/out_ --grid=!GRID!
EXIT /B 0
CALL :Run dx12, 1, %YUVPATH%
CALL :Run dx11, 2, %YUVPATH%
CALL :Run dx9, 4, %YUVPATH%
cd /D ORIGDIR
When it is executed, the parameter passed to Run are all empty. How to pass parameter to the function correctly