cmd line rename file with date and time

后端 未结 7 1554
余生分开走
余生分开走 2020-12-14 11:03

Project moving forwards, I can see why creating .bat files to do things can become addictive! I can now save somefile.txt at regular intervals, I then rename somefile.txt by

7条回答
  •  臣服心动
    2020-12-14 11:28

    I tried to do the same:

    . --> __

    I found that :

    rename 's/(\w+)(\.\w+)/$1'$(date +"%Y%m%d_%H%M%S)'$2/' *
    

提交回复
热议问题