How can I batch convert flac files to wav?

4

0

I'm using Windows XP, and I have several (about 160) flac files which I need to convert to wav. Since it is not practical to convert so many one by one, I need a utility that can convert them, but also preserve the metadata. It is crucial that the metadata is present and not altered, and I would highly prefer anything portable (sans-installation), and command line utilities would help too.

Thank you for helping

==EDIT== I don't need the metadata, can this conversion be done now, somehow?

ayane

Posted 2012-11-18T05:42:39.217

Reputation: 249

3Uhm, WAV has very limited metadata support you know? It simply can't handle everything that can be stored in a flac file. – Zoredache – 2012-11-18T12:08:31.643

Answers

4

The default flac distribution include a binary called flac(.exe). You can decompress flac files with it using the -d option.

Just use the cmd shell from the folder with .flac files:

FOR %f IN (*.flac) DO "C:\Program Files (x86)\FLAC\flac.exe" -d "%f"

Ярослав Рахматуллин

Posted 2012-11-18T05:42:39.217

Reputation: 9 076

Thank you, this is just what I needed. It also has an option to write to STDout (EXACTLY what I needed), so this is perfect. – ayane – 2012-11-23T19:10:26.467

I have encountered difficulties when feeding the output from flac into lame. The duration of the mp3 files comes out wrong sometimes. It's possible to recalculate the length of VBR mp3s using some utility (e.g foobar2000), but I find it generally safer to use intermediate wav files. – Ярослав Рахматуллин – 2014-01-21T23:10:48.717

0

It's really easy to do in Reaper (freely available uncrippled shareware DAW) if you don't feel like going into the command line.

Just drag all your flac files into Reaper. Then select File - Render - Stems - WAV - set filename wildcard to $track - and hit go.

It's detailed here: https://www.doctormix.com/blog/how-to-export-multiple-tracks-in-reaper

Richard

Posted 2012-11-18T05:42:39.217

Reputation: 333

0

MediaMonkey can do both the conversion and metadata mapping. It can also be installed in portable mode.

Rusty Monkey

Posted 2012-11-18T05:42:39.217

Reputation: 179

0

The solution above did not work for me on Windows 7 (I got errors about the FOR syntax).

I needed to recursively convert a ton of flac files in place, so I did the following.

  1. Create a batch file called decompress_flac.bat with this in it:
@ECHO OFF
FOR /R %1 %%G IN (*.flac) DO (
    ECHO "Attempting to convert %%G"
    flac.exe -d "%%G"
)
  1. Open up a command prompt and cd to wherever you put the batch file, if it isn't in your PATH.
  2. Call the batch file:
decompress_flac.bat f:\

drone1

Posted 2012-11-18T05:42:39.217

Reputation: 1