Use bash to loop over and convert, rename files

published Sep 20, 2010 04:02   by admin ( last modified Sep 20, 2010 04:02 )

Found this on the Internet, will add inks if I find the sources again:

Batch convert wav to mp3:

for f in *.wav ; do lame -V 2 "$f" ; done

Batch rename mp3s

for f in *.mp3 ; do AUFILE=`echo "$f" | sed 's/.wav//g'` ; mv "$f" "$AUFILE"; done