@echo off setlocal EnableExtensions if "%~1"=="" goto usage set "SRC=%~1" if not exist "%SRC%\" goto usage set "OUT=%~2" if "%OUT%"=="" set "OUT=%SRC%\mp3" where ffmpeg >nul 2>nul if errorlevel 1 ( echo ffmpeg not found. Install FFmpeg first. exit /b 1 ) if not exist "%OUT%\" mkdir "%OUT%" set /a DONE=0 >nul set /a SKIPPED=0 >nul for %%F in ("%SRC%\*.wav") do ( if exist "%%~fF" ( if exist "%OUT%\%%~nF.mp3" ( echo Skip: %%~nxF set /a SKIPPED+=1 >nul ) else ( ffmpeg -hide_banner -loglevel error -nostdin -n -i "%%~fF" -map_metadata 0 -codec:a libmp3lame -b:a 192k "%OUT%\%%~nF.mp3" if errorlevel 1 ( echo Failed: %%~nxF ) else ( echo Done: %%~nxF set /a DONE+=1 >nul ) ) ) ) echo Finished. Converted: %DONE%, skipped: %SKIPPED% echo Output: %OUT% exit /b 0 :usage echo Usage: %~nx0 "folder with wav files" ["output folder"] exit /b 2