Skip to content

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Convert all files in directory to .WAV, with sequential numbering for file name
#!/bin/bash
FILES=*
DIR=converted
mkdir $DIR
let i=0
for f in $FILES
do
if [ $f != $DIR ] && [ $f != "convert" ]
then
#name=$DIR/$i-${f%\.*}.wav
if [ $i -lt 10 ]; then
name=$DIR/0$i.wav
else
name=$DIR/$i.wav
fi
echo "$f to $name"
afconvert -f WAVE -d LEI16@44100 -c 1 $f $name
let i++
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.