Click to See Complete Forum and Search --> : Using the Rename Command?


x0054
01-26-2005, 04:56 PM
Yes I did read the man pages :) and I can not figure out how to do something. I have a list of files wls01 wls02 wls03 .... etc. I need to rename them to wls01.mp3 ... etc. Basically I need to add a .mp3 extension to all files that start with wls. The command I tried to use is as such:

rename wls** wls**.mp3 wls**

But it does nothing. No errors, nothing. What's wrong. How would I go about doing this?

- Bogdan

Choozo
01-26-2005, 05:11 PM
for f in wls*; do
mv $f $f.mp3
done