How to batch rename 40000 files on a folder with number count

后端 未结 2 1400
Happy的楠姐
Happy的楠姐 2021-01-24 03:27

I need to batch rename 40000 files on a folder with a number count in the end like this:. something.jpg to something_00001.jpg. I\'d like to work with the rename command, but an

2条回答
  •  逝去的感伤
    2021-01-24 03:58

    Here's a solution using renamer.

    $ tree
    .
    ├── beach.jpg
    ├── sky.jpg
    
    $ renamer --path-element name --index-format %05d --find /$/ --replace _{{index}} *
    
    $ tree
    .
    ├── beach_00001.jpg
    ├── sky_00002.jpg
    

提交回复
热议问题