Erik Bachmann - 2013-12-15

Seems like flac fails if no meta data is found. Try something like:

FOR %%A IN (*.WAV) DO (
 flac.exe -V -f --keep-foreign-metadata --replay-gain -8 "%%A"
 IF ERRORLEVEL 1 flac.exe -V -f --replay-gain -8 "%%A"
 flac.exe -t "%%~dpnA.flac"
)