Here is my batch file:
Code: Select all
:: remove embedded artwork
for /R %1 %%f in (*.flac) do (metaflac.exe --remove --block-type=PICTURE "%%f")
:: remove replaygain if there because it will be added during conversion
for /R %1 %%f in (*.flac) do (metaflac.exe --remove-replay-gain "%%f")
:: remove these tags I do not want (there is probably a better way to do this)
for /R %1 %%f in (*.flac) do (metaflac --remove-tag=COMMENT --remove-tag=TRACKTOTAL --remove-tag="TOTAL DISCS" --remove-tag="TOTAL TRACKS" --remove-tag="TOTALDISCS" --remove-tag="TOTALTRACKS" --remove-tag=COMPILATION --remove-tag=COMPOSER --remove-tag=ORIGINALARTIST --remove-tag=COPYRIGHT --remove-tag=URL --remove-tag=ENCODEDBY --remove-tag=BPM --remove-tag=LYRICS --remove-tag=VERSION --remove-tag=GROUPING --remove-tag=SUBTITLE --remove-tag=RELESETIME --remove-tag=ORIGARTIST --remove-tag=RATING --remove-tag=MOOD --remove-tag=DISCNUMBER --remove-tag=DISC --remove-tag=CONDUCTOR --remove-tag=LYRICIST --remove-tag=ORIGINALLYRICIST --remove-tag=RELEASETIME --remove-tag=AUDIOFILEURL --remove-tag=AUTHORURL --remove-tag=AUDIOSOURCEURL --remove-tag=RADIOSTATIONNAME --remove-tag=RADIOSTATIONURL --remove-tag=BUYCDURL --remove-tag=ISRC --remove-tag=ORGANIZATION --remove-tag=LABELNO --remove-tag=LANGUAGE --remove-tag="RIP DATE" --remove-tag="Retail Date" --remove-tag=MEDIA --remove-tag=ENCODER --remove-tag="ENCODED BY" --remove-tag="ENCODER SETTINGS" --remove-tag="PROFILE" --remove-tag="SOURCE" --remove-tag="Ripping Tool" --remove-tag="Release Type" --remove-tag=ENSEMBLE --remove-tag=OST --remove-tag="ACCURATERIPDISCID" --remove-tag="ACCURATERIPRESULT" --remove-tag="CATALOG #" --remove-tag="CDDB DISC ID" --remove-tag="CDTOC" --remove-tag="CRC" --remove-tag="STYLE" --remove-tag="UPC" "%%f")
:: start a foobar and make a new playlist
start "" %foobar%\foobar2000.exe /runcmd="New Playlist"
:: add the directory passed to this batch file to the new playlist
%foobar%\foobar2000.exe /add %1
:: wait 2 seconds
timeout 2
:: convert files with a preset called flac
%foobar%\foobar2000.exe /runcmd-playlist="Convert/flac"
:: remove the playlist
%foobar%\foobar2000.exe /runcmd="remove Playlist"