@ECHO OFF
SET "SRCDIR=d:\0_tmp"
SET "DSTDIR=d:\0_tmp\ttt"
IF NOT EXIST %SRCDIR% (
ECHO %SRCDIR% not found.
EXIT /B
)
IF NOT EXIST %DSTDIR% MKDIR %DSTDIR%
CD /D "%SRCDIR%
SETLOCAL ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION
SET /A FILE_COUNT=0
FOR /F "TOKENS=*" %%A IN ('DIR /B /ON *.FLAC') DO (
ECHO ffmpeg.exe -y -i "%%A" -acodec libmp3lame -ab 320k -map_metadata 0 -id3v2_version 3 -write_id3v1 1 "%DSTDIR%\%%A.mp3"
ffmpeg.exe -y -i "%%A" -acodec libmp3lame -ab 320k -map_metadata 0 -id3v2_version 3 -write_id3v1 1 "%DSTDIR%\%%A.mp3"
SET /A FILE_COUNT+=1
)
ENDLOCAL
ECHO.
ECHO TOTAL: %FILE_COUNT%
PAUSE