pstray / rename

Rename renames the filenames supplied according to the rule specified as the first argument. The argument is a Perl expression which is expected to modify the $_ string for at least some of the filenames specified.
Other
6 stars 1 forks source link

[v1.9] Only one numbered backup is created when the name contains non empty, closed brackets or braces. #3

Closed ghost closed 3 years ago

ghost commented 3 years ago

The numbered backup doesn't work properly (only one backup is created) when the file or directory name contains non empty, closed brackets or braces. Example:

Test files:

textfile{0}
tEXTFILE{0}
Textfile{0}
TEXTFILe{0}
TEXTFILE{0}

Command:

rename -bVt 'y/A-Z/a-z/' *

Result:

textfile{0}
textfile{0}.~1~

Expected result:

textfile{0}
textfile{0}.~1~
textfile{0}.~2~
textfile{0}.~3~
textfile{0}.~4~
pstray commented 3 years ago

Thanks for the bugreport. A new version is uploaded here and on CPAN.

ghost commented 3 years ago

Thanks for the bugreport. A new version is uploaded here and on CPAN.

Awesome. Thank you!