Поскольку у меня не установлен ffmpeg на этом компьютере, не проверено:
:: Q:\Test\2018\06\20\SU_1332169.cmd @Echo off Set "BaseDir=c:\myfolder" Set "OutMp4=%BaseDir%\Output.mp4" Set "FfmpegCue=%Temp%\Ffmpeg.Cue" :: gather files but exclude evt. present output file ( For /f "Delims=" %%A in ( 'Dir /B/S/A-D/ON "%BaseDir%\*.mp4" 2^>NUL ^|findstr /VLI "%OutMp4%" ' ) Do Echo=%%A ) > "%FfmpegCue%" :: Just to show what's in the cue file: more "%FfmpegCue%" Pause :: Do the concat ffmpeg.exe -f concat -i "%FfmpegCue%" -c copy "%OutMp4%" && ( Echo Successfully created "%OutMp4%" choice /M "Delete %FfmegCue% " If not Errorlevel 2 Del "%FfmegCue%" ) || (echo ffmpeg exited with error)