Convert all file extensions to lower-case

前端 未结 11 1952
生来不讨喜
生来不讨喜 2020-12-07 14:06

I\'m trying to lower-case all my extensions regardless of what it is. So far, from what I\'ve seen, you have to specify what file extensions you want to convert to lower-cas

11条回答
  •  [愿得一人]
    2020-12-07 14:50

    I got success with this command.

    rename JPG jpg *.JPG
    

    Where rename is a command that tells the shell to rename every occurrence of JPG to jpg in the current folder with all filenames having extension JPG.

    If you see Bareword "JPG" not allowed while "strict subs" in use at (eval 1) line 1 with this approach try:

    rename 's/\.JPG$/.jpg/' *.JPG
    

提交回复
热议问题