Programming + ScriptingBatch Files Convert media file using ffmpeg Updated August 11 2024
Put the following in a batch file. You will need to download ffmpeg and place it in some path.
https://ffmpeg.org/download.html


Copy to Clipboard @echo off set ffmpeg="C:\Tools\Utils\ffmpeg-win-2.2.2\ffmpeg.exe" set infolder=C:\Temp\In-WAV set outfolder=C:\Temp\Out-MP3 set infiletype=wav set outfiletype=mp3 echo Starting! echo Input folder: %infolder% echo Output folder: %outfolder% echo Input filetype: %infiletype% echo Output filetype: %outfiletype% echo. cd /d "%infolder%" if not exist "%outfolder%\." md "%outfolder%" dir echo Starting! for %%f in (%infolder%\*.%infiletype%) do ( if exist "%outfolder%\%%~nf.%outfiletype%" echo Skipping '%%~nf.%infiletype%' since '%outfolder%\%%~nf.%outfiletype%' exists. if not exist "%outfolder%\%%~nf.%outfiletype%" ( echo. echo. echo -------------------- Starting '%%f' echo Converting '%%f' to '%outfolder%\%%~nf.%outfiletype%' %ffmpeg% -i "%%f" "%outfolder%\%%~nf.%outfiletype%" ) ) echo. echo. echo All Finished! echo. timeout 10




©2024 - Some portions of this website are Copyrighted.
Your IP: 3.138.118.194     Referring URL:
Browser: Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
Terms and Conditions, Privacy Policy, and Security Policy