Hi, frustrated with a directory whose filenames all began with numbers, I did this to strip the numbers from them.
for f in * ; do mv $f $(echo $f | sed -e "s/[0-9]//g"); done
which removed the numbers from filenames with in directory.
I hadn't thought about the one number at the end (a 3). So now I'm left with a bunch of .mp files
Yeah, I'm laughing too!
I did this
for f in * ; do mv $f $(echo $f | sed -e "s/[.mp]/.mp3/g"); done
Which has given each file an extension of .mp3.mp3.mp3
It also added a 3 (as seen above) to the middle of some files.
I was clever enough to preserve each my originals
and the .mp files.
How do I stick a three on the end? Every file in the directory is an .mp3, which might help a bit. Thanks, Kurt