I have a lot of files I\'m trying to rename, I tried to make a regular expression to match them, but even that I got stuck on the files are named like:
<
In my debian it works well with rename, tested with 300 files.
perl -e 'map `touch door$_.txt`, 1..300;' rename 's/(\d+)\.txt/sprintf("%03d.txt", $1)/e' *.txt