I have multiple folders and each one have around 175 files in it. file names are like
1.wav
2.wav
3.wav
......
175.wav
I have to rename them as
A1.wav
A2.wav
A3.wav
......
A175.wav
In other words I have to append Letters in previous file names.
I am wondering if there is a easy way to do this.
Ubuntu Version is 16.10
^(.*)makes the whole name to be treated as$1. So you're literally sticking A at the end of whole name. What you want to do is use extra grouping, make$1be everything before.wavand make.wavbe$2. Like this:prename -nv 's/^(.*)(.wav)$/$1A$2/' *.wavSo here first(.*)will be$1and is everything before.wav. The second group(.wav)is$2– Sergiy Kolodyazhnyy Jun 07 '17 at 17:06