Setting a windows batch file variable to the day of the week

后端 未结 17 1947
南方客
南方客 2020-11-27 20:14

I have a windows batch file that runs daily. Wish to log data into a file and want to rotate it (i.e. having at most the last 7 days worth of data).

Looked into the

17条回答
  •  执念已碎
    2020-11-27 20:59

    Rem Remove the end comma and add /A to set for this line worked for me.
    set /A a=yy/100, b=a/4, c=2-a+b, e=36525*(yy+4716)/100, f=306*(mm+1)/10 
    

提交回复
热议问题