in a for loop just 2 kind of extentions
Posted: 08 Nov 2018 14:13
Friends
I have a for loop where i loop through a dir full of video files - call an ffmpeg cmd and make mp4
I do that like so ( a snippit )
or /f %%a IN ('dir /b *.*') do
now this does my command on every file in that dir ( that i have already cd'd to )
it will work nicely on iether f.avi or f.mov ..... good
but it will *also* try to make a mp4 from a txt file ....which is not good
here is my question can i limit it to 2 declared extentions
like
or /f %%a IN ('dir /b *.avi OR *.mov') do
meaning it works on all file.avi all file.mov but ONLY those 2
so far I have solved this by 2 for loops
1 for *.mov and 1 for *.avi
thanks
jS
I have a for loop where i loop through a dir full of video files - call an ffmpeg cmd and make mp4
I do that like so ( a snippit )
or /f %%a IN ('dir /b *.*') do
now this does my command on every file in that dir ( that i have already cd'd to )
it will work nicely on iether f.avi or f.mov ..... good
but it will *also* try to make a mp4 from a txt file ....which is not good
here is my question can i limit it to 2 declared extentions
like
or /f %%a IN ('dir /b *.avi OR *.mov') do
meaning it works on all file.avi all file.mov but ONLY those 2
so far I have solved this by 2 for loops
1 for *.mov and 1 for *.avi
thanks
jS