|
|
| Don't ask to ask, just ask | |
| PerlMonks |
Re: I have a folder which is having 1200 files,all the file names are have maximum of 8 character length.I need to remove last character from each of the filnames and prefix it with character "A"by moritz (Cardinal) |
| on Feb 20, 2013 at 20:13 UTC ( #1019840=note: print w/ replies, xml ) | Need Help?? |
|
rename 's/^.(\w+)\.(\w+)$/$1A.$2/' maybe. Run it with the -n option first to review it. The rename or prename tool is shipped with perl, and occasionally very helpful.
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||