On Jan 21, 2008 2:47 PM, Tracy R Reed <[EMAIL PROTECTED]> wrote:
> Writing a shell script using find to run the conversion is pretty
> simple. I think you probably know or can google how to do that.

I'll be darned.  Groovy.  But if you had, say, "dance hits.WMA" the
spaces wouldn't be underscored, would they?  You'd have to run the
script twice.

=======================
#!/bin/bash

current_directory=$( pwd )

#remove spaces
for i in *.wma; do mv "$i" `echo $i | tr ' ' '_'`; done

#remove uppercase
for i in *.[Ww][Mm][Aa]; do mv "$i" `echo $i | tr '[A-Z]' '[a-z]'`; done

#Rip with Mplayer / encode with LAME
for i in *.wma ; do mplayer -vo null -vc dummy -af resample=44100 -ao
pcm -waveheader $i && lame -m s audiodump.wav -o $i; done

#convert file names
for i in *.wma; do mv "$i" "`basename "$i" .wma`.mp3"; done

rm audiodump.wav
=======================

-todd


-- 
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-list

Reply via email to