net stop nginx
taskkill /F /IM nginx.exe set "cmdstr=rename logs logs%date:~0,4%-%date:~5,2%-%date:~8,2%-%time:~0,2%-%time:~3,2%.log" call %cmdstr% set "cmdstr=md logs " call %cmdstr% net start nginx #pause
net stop nginx
taskkill /F /IM nginx.exe set "cmdstr=rename logs logs%date:~0,4%-%date:~5,2%-%date:~8,2%-%time:~0,2%-%time:~3,2%.log" call %cmdstr% set "cmdstr=md logs " call %cmdstr% net start nginx #pause