I have a problem with a .bat script called "ProcessMKVEngAudEngSub.bat" that utilizes…
- User
I have a problem with a .bat script called "ProcessMKV_EngAud_EngSub.bat" that utilizes MKVToolNix on Windows 10. This is the script:
@echo off setlocal enabledelayedexpansion
REM =========================== REM Configuration REM ===========================
REM Destination directory where processed files will be saved set "DEST_DIR=D:\Video\MKVConvert"
REM Path to the mkvmerge executable set "MKVMERGE=C:\Program Files\MKVToolNix\mkvmerge.exe"
REM =========================== REM Setup REM ===========================
REM Create destination directory if it does not already exist if not exist "%DEST_DIR%" ( mkdir "%DEST_DIR%" )
REM =========================== REM Processing REM ===========================
REM Loop through each MKV file in the current directory for %%a in (*.mkv) do ( REM Get the base name of the file without extension set "FILE_NAME=%%~na"
REM Define the output filename set "OUTPUT_FILE=%DEST_DIR%%%~na.mkv"
REM Check if the output file already exists if exist "!OUTPUT_FILE!" ( echo Warning: Output file "!OUTPUT_FILE!" already exists. Skipping... ) else ( REM Display a message indicating processing echo Processing: %%~nxa
codeREM Execute mkvmerge to process the file "%MKVMERGE%" ^ --ui-language en ^ --priority highest ^ --video-tracks 0 ^ --audio-tracks 1 ^ --subtitle-tracks 2 ^ --no-attachments ^ --no-global-tags ^ --no-track-tags ^ --no-chapters ^ --language 0:en ^ --track-name 0: ^ --default-track-flag 0:yes ^ --language 1:en ^ --track-name 1: ^ --default-track-flag 1:yes ^ --sub-charset 2:UTF-8 ^ --language 2:en ^ --track-name 2: ^ --default-track-flag 2:yes ^ --title "" ^ --track-order 0:0,0:1,0:2 ^ --output "!OUTPUT_FILE!" ^ "%%~fa" REM Check if the processing was successful if !errorlevel! equ 0 ( echo Successfully processed %%~nxa and saved as !OUTPUT_FILE! ) else ( echo Error: Failed to process %%~nxa. Please check the input file and try again. ))
)
- Assistant