Renaming files with rename and perl expression
Hi,
I have a directory with filenames as follows:
PIC00001.JPG
PIC00002.JPG
..
PIC00036.JPG
I want to get renamed those to
PIC00199.JPG
PIC00200.JPG
..
PIC00234.JPG
I'm trying to use for this the 'rename' command with perl expression,
but sofar I'm here with the command:
rename -n 's/PIC000...JPG/PIC00199.JPG/' *
PIC00001.JPG renamed as PIC00199.JPG
PIC00002.JPG renamed as PIC00199.JPG
..
PIC00001.JPG renamed as PIC00199.JPG
The -n option is here for No Action: show what files would have been
renamed.
So how can I increase numbers in filenames in perl expression to get:
PIC00199.JPG
PIC00200.JPG
..
PIC00234.JPG
??
Where can I study perl expressions?
Any advices will be appreciated!
--
Regards, Pal
<http://cspl.me>
Reply to: