A simple script to rename files in a folder using regular expressions. Does not support recursive searching and renaming at the moment.
- 1first1.txt
- 2second2.png
- 3third3.exe
- 4fourth4.py
renexp [--sim] "[1-9]([a-z]*)[1-9](\.[a-z]+)?" "\1\2"
- first.txt
- second.png
- third.exe
- fourth.py
\1 and \2 are equivalent to the usual $1 and $2
Remember to surround the regular expressions with double quotes.
Use the --sim option to simulate the execution before renaming files definitively