Thanks for the prompt response, I apologize for the confusion
I'll try to be brief.
The goal is to package the video and audio in a file.
This means that in each folder, Folder1, Folder2, Folder3, has 3 files, 1 video (VIDEO01) and 2 audio (AUDIO01) (AUDIO02). and after executing the bat (3.BAT) become one single file.
this is the precise of packing instruction
bmxtranswrap -p -t op1a --ps-avcihead -o "OUT_SingleFile" %VIDEO01% %AUDIO01% %AUDIO02%
And this is the complete instruction of 3.bat
@echo off
DIR *.mxf /b /o > clips.txt
for /F "tokens=*" %%X in (clips.txt) do call :variables "%%X"
goto fin
:variables
set /a contador=contador + 1
::
if "%contador%"=="1" set linea1=%~1
if "%contador%"=="2" set linea2=%~1
if "%contador%"=="3" set linea3=%~1
if "%contador%"=="4" set linea4=%~1
if "%contador%"=="5" set linea5=%~1
goto:eof
:fin
echo %linea1%
echo %linea2%
echo %linea3%
echo %linea4%
echo %linea5%
bmxtranswrap -p -t op1a --ps-avcihead -o "OUT_%linea1%_.mxf" %linea1% %linea2% %linea3% %linea4% %linea5%
pause
For this reason, the bat should be in each folder. Each folder has the same bat (3.bat) but different contents of video and audio.
And what I want is to execute all bat (3.bat) at time.
One thing more 1,2,3 folders are created by another bat x.bat, which scans a directory and organizes videos and audios matching characters.
@echo off
FOR /R "C:\MATERIAL" %%a IN (*.mxf*) DO set ruta=%%a&set datos=%%~nxa&call :separar
pause
goto:eof
:separar
set copia=%datos:~0,4%
if not exist "C:\MATERIAL\CARPETAS\%copia%" MD "C:\MATERIAL\CARPETAS\%copia%"
set archivo=%datos%
if %archivo:~0,4% EQU %copia% copy "%ruta%" "C:\MATERIAL\CARPETAS\%copia%"
echo %ruta%
goto:eof
call exe.bat
pause
There exists a second bat (2.bat) which 3.bat copy to each individual folder created by x.bat
@echo off
for /D %%f in ("C:MATERIAL\CARPETAS\*") do copy "C:\3.bat" "%%f\"
pause
Any help is appreciated
Thanks for everything