2
rated 0 times
[
2]
[
0]
/ answers: 1 / hits: 498
/ 1 Year ago, sat, february 25, 2023, 11:04:04
How can I batch rename, using the terminal, a set of files where multiple numbers share the same prefix so that all those prefixes are set to new ones?
For example:
011.foo.txt -> 001.foo.txt
011.bar.psd -> 001.bar.psd
011.baz.gif -> 001.baz.gif
012.qux.js -> 002.qux.js
012.corge.png -> 002.corge.png
...
020.thud.txt -> 010.thud.txt
I'd like to use the rename command if possible:
rename [ -h|-m|-V ] [ -v ] [ -0 ] [ -n ] [ -f ] [ -d ] [ -e|-E perlexpr]*|perlexpr [ files ]
Really appreciate your help figuring this out, Thanks!
More From » command-line