I'm using mecoder to encoder multiple flv to avi, using

for file in *.flv; do mencoder -oac mp3lame -ovc lavc "$file" -o "$file".avi"; done

... and I'm getting *****.flv.avi and have to use gprename to get rid of the .flv (i've seen another nautilus-script that is doing the same thing also)

..can you please help me make this command work properly?