Renaming multiple files in multiple directories.

Christopher Brown yellowdog-general@lists.terrasoftsolutions.com
Fri, 17 Sep 2004 21:50:51 -0700


Sorry, I just cant wrap my puzzler around this for some reason.

Would someone be so kind as to tell me how to rename multiple files in 
multiple directories using the command line? I don't care if I have to 
repeat the command a few times and change the path but I just don't want to 
do this by hand. There are about 1000 files.

Example:
While ripping and encoding I accidentally named a good many of my files 
incorrectly and added extra characters(ogg) before the dot like so: 
(name-of-songogg.ogg)

What I want to do is rename all the files so they only have the name and 
.ogg extension like this: (name-of-song.ogg).

The directory structure looks like this:
(notice that the songs are at different levels but all inside the ogg 
folder)
/home/user/oggs/artist1/album1/name-of-song1ogg.ogg
/home/user/oggs/artist2/name-of-song2ogg.ogg
/home/user/oggs/artist3/greatesthits/album1/name-of-song3ogg.ogg


Thanks for any assistance,
Christopher