cmd line rename file with date and time

后端 未结 7 1550
余生分开走
余生分开走 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:32

    following should be your right solution

    ren somefile.txt  somefile_%time:~0,2%%time:~3,2%-%DATE:/=%.txt
    

提交回复
热议问题