Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a lot of WAV files that I do not wish to import into iTunes to convert. There are too many. I would like a way to convert these to Apple lossless in the terminal before importing to iTunes.

share|improve this question
up vote 12 down vote accepted

You'll need to make a short bash for loop in a script (or xargs) but the command in question you care about is:

afconvert -d alac in.wav out.m4a

More info can be found by running man afconvert or afconvert -h.

share|improve this answer
Simple one line loop example: for file in *.wav; do afconvert -d alac "$file" "${file%wav}m4a"; done – flori Aug 10 '13 at 13:40

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.