Batch rename sequential files by padding with zeroes

后端 未结 8 1191
天命终不由人
天命终不由人 2020-12-08 02:42

I have a bunch of files named like so:

output_1.png
output_2.png
...
output_10.png
...
output_120.png

What is the easiest way of renaming t

8条回答
  •  轮回少年
    2020-12-08 03:11

    $rename output_ output_0 output_?   # adding 1 zero to names ended in 1 digit
    $rename output_ output_0 output_??  # adding 1 zero to names ended in 2 digits
    $rename output_ output_0 output_??? # adding 1 zero to names ended in 3 digits
    

    That's it!

提交回复
热议问题