Painlessly convert FLAC to ALAC on Windows?

In Ubuntu, you can open a terminal, navigate to the directory in question, and do the following command loop:

for f in *.flac; do ffmpeg -i "$f" -acodec alac "${f%.flac}.m4a"; done
  • Will convert all .flac files in the directory to .alac files, doing so in a bit-perfect way.
  • ffmpeg doesn't come packaged with Ubuntu, so you'd need to install that from repos; however, I can't say for sure that this will keep your BPM tag info.

Also, it would seem that getting iTunes to play FLAC files (and properly downconvert them to use space efficiently on my iPod) is pretty much impossible.

There's a program called flukeformac that may allow you to play .flac files in iTunes.
As to conversion for efficient iPod use, the following command loop will do the trick:

for file in *.flac; do $(flac -cd "$file" | lame --preset fast extreme - "${file%.flac}.mp3"); done`
  • You may want to replace --preset fast extreme with a lower bitrate option
    (more on lame presets)

For Windows using PowerShell and ffmpeg (based on @boehj answer):

Ls -Recurse -Include *.flac | %{C:\path_to_ffmpeg\ffmpeg.exe -i $_.FullName -acodec alac ($_.DirectoryName+"\\"+$_.BaseName+'.m4a')}

dBpoweramp can convert FLAC to ALAC; after installing, get the needed codecs here.

.