I have a lot of movies that are 2 files and I want to join them into one file using Avidemux. Right now I've written a batch script to make it a little faster to join the 2 files like I put below. I have to update the "moviefinal" value, save the files, then run it. I have to do this each time with each movie though.
---------------------------
set avidexmuxprog="C:\Programs\avidemux\avidemux.exe"
I've tried putting this into a "for" loop, but the (set) doesn't like spaces in the names and using quotes messes it up too.
---------------------------
set avidexmuxprog="C:\Programs\avidemux\avidemux.exe"
set movie1="The Figher"
set movie2="The Fifth Element"
FOR /f "delims=," %%G IN (%movie1%,%movie2%) DO (%avidexmuxprog% --load "c:\test\%%G - CD1.avi" --append "c:\test\%%G - CD2.avi" --force-smart --save "c:\test\final\%%G.avi" --quit)
:end
---------------------------
Is there a way, in batch to have it automatically detect a file with the same name, but with the CD1/CD2 and then run the command for each file set that it finds in a directory?
I'm not too advanced in batch, but hoping there's a way to automate the entire process so I don't have to keep manually typing in the name.
I use it every day so personally yes I need it, or rather I want it. I use OpenShell though, not the garbage modern Start Menu. I just counted and at the moment I have a total of 92 program shortcuts organized into six folders almost exactly the way I did back in Windows 95. I can get to any program I want to run very quickly. I never use Search to find or run programs.
I use the search function and little else since Windows 11 (but there are times where Saved Searches take precedence since the search feature on the Start menu is worse than before). I use other features in previous releases.
Question
nicedreams
I have a lot of movies that are 2 files and I want to join them into one file using Avidemux. Right now I've written a batch script to make it a little faster to join the 2 files like I put below. I have to update the "moviefinal" value, save the files, then run it. I have to do this each time with each movie though.
---------------------------
set avidexmuxprog="C:\Programs\avidemux\avidemux.exe"
set moviefinal=The 40 Year Old Virgin
set moviefile1=%moviefinal% - CD1
set moviefile2=%moviefinal% - CD2
%avidexmuxprog% --load "T:\Video\Movies\%moviefile1%.avi" --append "T:\Video\Movies\%moviefile2%.avi" --force-smart --save "C:\_COMBINED_AVI\%moviefinal%.avi" --quit
:end
---------------------------
I've tried putting this into a "for" loop, but the (set) doesn't like spaces in the names and using quotes messes it up too.
---------------------------
set avidexmuxprog="C:\Programs\avidemux\avidemux.exe"
set movie1="The Figher"
set movie2="The Fifth Element"
FOR /f "delims=," %%G IN (%movie1%,%movie2%) DO (%avidexmuxprog% --load "c:\test\%%G - CD1.avi" --append "c:\test\%%G - CD2.avi" --force-smart --save "c:\test\final\%%G.avi" --quit)
:end
---------------------------
Is there a way, in batch to have it automatically detect a file with the same name, but with the CD1/CD2 and then run the command for each file set that it finds in a directory?
I'm not too advanced in batch, but hoping there's a way to automate the entire process so I don't have to keep manually typing in the name.
Link to comment
https://www.neowin.net/forum/topic/1128384-batch-file-to-run-command-on-joining-video-files/Share on other sites
24 answers to this question
Recommended Posts