I am trying to figure out how to create a script that will take all video files in a folder videos\*.* and then use ffmpeg on each one and output the files to converted\*.mp4 where the filenames are the same.
However, I can't figure out how to get the for loop working, so that I can extract the name and extension type of file I am processing.
for %%f IN (videos\*.*) DO (convert.bat %%f)
convert.bat
ffmpeg.exe -i %1 -f mp4 converted\%~n.mp4
I have tried both with and without double quotes. However, it won't recognise the file.