Created

Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist

Convert all files in directory to .WAV, with sequential numbering for file name

View convert
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
#!/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.