Rename all files in directory from $filename_h to $filename_half?

前端 未结 11 914
执念已碎
执念已碎 2020-12-02 03:45

Dead simple.

How do I rename

05_h.png
06_h.png

to

05_half.png
06_half.png

At least, I think it\

11条回答
  •  天涯浪人
    2020-12-02 04:41

    I had a similar question: In the manual, it describes rename as

    rename [option] expression replacement file
    

    so you can use it in this way

    rename _h _half *.png
    

    In the code: '_h' is the expression that you are looking for. '_half' is the pattern that you want to replace with. '*.png' is the range of files that you are looking for your possible target files.

    Hope this can help c:

提交回复
热议问题