I have a directory with about 50 wav files that I need to convert to caf, because AudioServicesCreateSystemSoundID() returns an error for some of them (but not all).
Here's an example of the command I've used successfully for a single file:
afconvert -f caff -d LEI16@44100 -c 1 whistle.wav whistle.caf
How do I do this quickly - not one-by-one for each file?