cmd line rename file with date and time

后端 未结 7 1541
余生分开走
余生分开走 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:35
    ls | xargs -I % mv % %_`date +%d%b%Y`
    

    One line is enough. ls all files/dirs under current dir and append date to each file.

    0 讨论(0)
提交回复
热议问题