How do I use afconvert to convert all the files in a directory from wav to caf?
On Windows, use the %~ni
syntax.
for %i in (*.wav) do afconvert -f caff -d LEI16@44100 -c 1 %i %~ni.caf
Similar approach for bash: for i in *.wav; do afconvert -f caff -d LEI16@44100 -c 1 $i ${i%.wav}.caf; done
for file in *.wav; do afconvert -f caff -d LEI16@44100 -c 1 "$file"; done
Hit the Return key directly after done
.
Simple :)