Create merge_split_AVIs.bat
Initial commit at the .bat to merge my old movie files that are split by CD1 and CD2, and use the .avi format. Names the file after the name of the folder it's in.
This commit is contained in:
commit
3881d37a9d
|
@ -0,0 +1,21 @@
|
|||
@echo off
|
||||
setlocal enabledelayedexpansion
|
||||
|
||||
:: Get the name of the current directory
|
||||
for %%I in (.) do set "FolderName=%%~nI"
|
||||
|
||||
set "file1="
|
||||
set "file2="
|
||||
|
||||
:: Find files containing 'cd1' and 'cd2' in the name
|
||||
for %%F in (*cd1*.avi) do set "file1=%%F"
|
||||
for %%F in (*cd2*.avi) do set "file2=%%F"
|
||||
|
||||
:: Concatenate if both files are found
|
||||
if defined file1 if defined file2 (
|
||||
ffmpeg -i "concat:!file1!|!file2!" -c copy "!FolderName!.avi"
|
||||
) else (
|
||||
echo Matching file pairs not found.
|
||||
)
|
||||
|
||||
endlocal
|
Loading…
Reference in New Issue