-
-
Notifications
You must be signed in to change notification settings - Fork 22
Closed
Description
I have the following files in my folder:
pic_F01P01.jpg
pic_F01P02.jpg
pic_F01P03.jpg
I want to obtain:
F01P01.jpg
F01P02.jpg
F01P03.jpg
I was expecting this command to work, but it's not:
brename -p ".*F(\d\d)P(\d\d).*\.jpg" -r 'F$1P$2.jpg' -d
Searching for paths to rename...
[OK] pic_F01P01.jpg -> F01.jpg
[OK] pic_F01P02.jpg -> F02.jpg
[OK] pic_F01P03.jpg -> F03.jpg
3 path(s) to be renamed
If i add a non alpha character to separate the $1
and the P
, it works:
brename -p ".*F(\d\d)P(\d\d).*\.jpg" -r 'F$1-P$2.jpg' -d
Searching for paths to rename...
[OK] pic_F01P01.jpg -> F01-P01.jpg
[OK] pic_F01P02.jpg -> F01-P02.jpg
[OK] pic_F01P03.jpg -> F01-P03.jpg
3 path(s) to be renamed
Exact same thing happens if i use -r "F\$1P\$2.jpg"
I'm on Ubuntu 22.04.3
Metadata
Metadata
Assignees
Labels
No labels